git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] patch-id: Add support for mbox format
Date: Fri, 16 Apr 2010 22:55:35 +0200	[thread overview]
Message-ID: <4BC8CEC7.40003@gnu.org> (raw)
In-Reply-To: <7vk4s7cks4.fsf@alter.siamese.dyndns.org>

On 04/16/2010 08:30 PM, Junio C Hamano wrote:
>> >  I have an alias that takes two arguments and compares their patch IDs.
>> >  I would like to use to make sure I've tested exactly what I submit
>> >  (patch by patch), like
>> >
>> >      git patch-cmp origin/master.. file-being-sent
>> >
>> >  However, I cannot do that because git patch-id is fooled by the
>> >  "-- " trailer that git format-patch puts.
>> >
>> >  This patch adds a bit of lookahead to git patch-id in order to detect
>> >  the trailer and split the patch when it comes.  In addition, commit
>> >  ids in the "From " lines are considered and printed in the output.
>
> How well does this interact with mime encoded output?

It doesn't work.  I have a version of the patch that works with it now 
(by parsing hunk headers and looking for a "--" line outside the hunk, 
but I doubt that would satisfy your feeling.

> I somehow have a feeling that this is solving a wrong problem.

In what sense?

In the end the patch id is what matters for the usecase above.  I could 
obtain it in other ways for the "origin/master.." part, but the mbox 
file from "git format-patch --stdout" must be given unmodified to 
git-patch-cmp, otherwise it wouldn't be what I send on the next step.

Paolo

  reply	other threads:[~2010-04-16 20:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 16:22 [PATCH] patch-id: Add support for mbox format Paolo Bonzini
2010-04-16 18:30 ` Junio C Hamano
2010-04-16 20:55   ` Paolo Bonzini [this message]
2010-04-16 21:23     ` Junio C Hamano
2010-04-16 21:52       ` Paolo Bonzini
2010-04-17  2:43         ` Junio C Hamano
2010-04-19  8:46           ` [PATCH 1/2] patch-id: extract parsing one diff out of generate_id_list Paolo Bonzini
2010-04-19  8:46             ` [PATCH 2/2] patch-id: Add support for mbox format Paolo Bonzini
2010-04-19 21:48               ` Junio C Hamano
2010-04-20  8:47                 ` Paolo Bonzini
2010-04-20 16:54                   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC8CEC7.40003@gnu.org \
    --to=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).