From: Junio C Hamano Date: Wed, 26 Dec 2012 20:35:28 GMT Subject: Re: generating format-patch options from an e-mail Message-ID: <7vbodgo8kv.fsf@alter.siamese.dyndns.org> In-Reply-To: <20121226200623.GA29446@simaj.xs4all.nl> Simon Oosthoek writes: > 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 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 ) 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.