From: Simon Oosthoek <s.oosthoek@xs4all.nl>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: generating format-patch options from an e-mail
Date: Wed, 26 Dec 2012 22:07:37 +0100 [thread overview]
Message-ID: <20121226210737.GB20704@xs4all.nl> (raw)
In-Reply-To: <7vbodgo8kv.fsf@alter.siamese.dyndns.org>
* 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
> >
> > 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 various options to git format-patch (--to --cc --in-reply-to) based on the headers To:/Cc:/From:/Message-ID:
Cheers
Simon
next prev parent reply other threads:[~2012-12-26 21:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-26 20:06 generating format-patch options from an e-mail Simon Oosthoek
2012-12-26 20:35 ` Junio C Hamano
2012-12-26 21:07 ` Simon Oosthoek [this message]
2012-12-26 21:31 ` Pyeron, Jason J CTR (US)
2012-12-26 21:57 ` Jeff King
-- strict thread matches above, loose matches on Subject: below --
2012-12-26 20:28 Simon Oosthoek
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=20121226210737.GB20704@xs4all.nl \
--to=s.oosthoek@xs4all.nl \
--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).