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

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

From
PUPyeron, Jason J CTR (US) <jason.j.pyeron.ctr@mail.mil>
Date
Dec 26, 2012, 21:31 UTC
Message-ID
<871B6C10EBEFE342A772D1159D1320853A00DD2E@umechphj.easf.csd.disa.mil>
In-Reply-To
<20121226210737.GB20704@xs4all.nl>
Show 9 quoted lines
> -----Original Message-----
> From: Simon Oosthoek
> Sent: Wednesday, December 26, 2012 4:08 PM
> 
> * Junio C Hamano <gitster@pobox.com> [2012-12-26 12:35:28 -0800]:
> > >
> > > 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
Anyway you would need a --in-reply-to-email and a --in-reply-to-all-email, both should support stdin. Then you can feel free to --[no-]to and --[no-]cc (where is the --bcc?) to your heart's content.
It would be a nice addition.
Show 17 quoted lines
> > >
> > > 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.
> >
> 
> That would work for the message-ID, but not for the various To: and Cc:
> addresses.
> 
> The hacky script that I sent afterwards produces a string with the
Nit, it does not make use of the reply-to header if present.
Show 10 quoted lines
> various options to git format-patch (--to --cc --in-reply-to) based on
> the headers To:/Cc:/From:/Message-ID:
> 
> Cheers
> 
> Simon
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Simon OosthoekNext: Jeff King
Message 4 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.