git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 11 in “patch-id: Add support for mbox format”
  1. patch-id: Add support for mbox formatPaolo Bonzini, Apr 16, 2010
  2. Junio C HamanoApr 16, 2010
  3. Paolo BonziniApr 16, 2010
  4. Junio C HamanoApr 16, 2010
  5. Paolo BonziniApr 16, 2010
  6. Junio C HamanoApr 17, 2010
  7. 1/2 patch-id: extract parsing one diff out of generate_id_listPaolo Bonzini, Apr 19, 2010
  8. 2/2 patch-id: Add support for mbox formatPaolo Bonzini, Apr 19, 2010
  9. Junio C HamanoApr 19, 2010
  10. Paolo BonziniApr 20, 2010
  11. Junio C HamanoApr 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.