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

Re: generating format-patch options from an e-mail

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 26, 2012, 20:35 UTC
Message-ID
<7vbodgo8kv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121226200623.GA29446@simaj.xs4all.nl>
Simon Oosthoek <s.oosthoek@xs4all.nl> writes:
Show 10 quoted lines
> Hi all
>
> I've been very frustrated by the process to setup a commandline for git format-patch, to include everyone in the cc list and reply to the right message-id.
>
> In my frustration I created a perl script to generate the options from a saved e-mail, I realise that it may be non-general and perhaps it could be written better using a module which understands e-mails, but well, it worked for me ;-)
>
> Anyway, I could imagine this as optional flag of git format-patch, so you could say:
> $ git format-patch -s --in-reply-to-email <mboxfile> a7fe7de8
>
> But I'll save that as an exercise for the reader (or the future)

I think a much more general approach would be to turn your script into "get-msg-id" script and use it like so:

  $ git format-patch --in-reply-to $(get-msg-id <mboxfile>) a7fe7de8

Then you can reuse that script in a context outside format-patch, whereever you need the message-id in a single message in the mailbox.

Previous: Simon OosthoekNext: Simon Oosthoek
Message 2 of 5 in “generating format-patch options from an e-mail”
  1. Simon OosthoekDec 26, 2012
  2. Junio C HamanoDec 26, 2012
  3. Simon OosthoekDec 26, 2012
  4. Pyeron, Jason J CTR (US)Dec 26, 2012
  5. Jeff KingDec 26, 2012

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.