Re: [PATCH v2 2/3] format-patch: allow forcing the use of in-body From: header
- From
Jeff King <peff@peff.net>
- Date
- Aug 30, 2022, 20:07 UTC
- Message-ID
- <Yw5t9mfaIi647Qbl@coredump.intra.peff.net>
- In-Reply-To
- <20220829213837.13849-3-gitster@pobox.com>
On Mon, Aug 29, 2022 at 02:38:36PM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> +--[no-]force-in-body-from:: > + With the e-mail sender specified via the `--from` option, by > + default, an in-body "From:" to identify the real author of > + the commit is added at the top of the commit log message if > + the sender is different from the author. With this option, > + the in-body "From:" is added even when the sender and the > + author have the same name and address, which may help if the > + mailing list software mangles the sender's identity.
I find it a little curious that this option can only be used with "--from". That makes sense in a way, because this is a special case of that feature, overriding the "are they the same" check.
But given that the use case is not to send somebody else's patch, but to duplicate your _own_ ident in both spots, it feels funny that you must also say "by the way, I am the sender of the email". I.e., you have to say:
git format-patch --from='Me <me@example.com>' --force-in-body-from
I guess it is not too bad because just "--from" will do the equivalent thing (picking "me" from your committer ident). It just feels kind of clunky that:
git format-patch --force-in-body-from
will silently ignore the option.
All that said, I don't care _too_ strongly about it. I do suspect the feature might be better placed in send-email (or possibly in addition). If you are using send-email, then I think you're not supposed to use "--from" with format-patch at all, and you have no way of accessing this feature.
-Peff