Re: [PATCH] patch-id: Add support for mbox format
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Apr 16, 2010, 20:55 UTC
- Message-ID
- <4BC8CEC7.40003@gnu.org>
- In-Reply-To
- <7vk4s7cks4.fsf@alter.siamese.dyndns.org>
On 04/16/2010 08:30 PM, Junio C Hamano wrote:
Show 14 quoted lines
>> > 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