Thread (11 messages) 11 messages, 3 authors, 2022-08-30

Re: [PATCH v2 2/3] format-patch: allow forcing the use of in-body From: header

From: Jeff King <hidden>
Date: 2022-08-30 20:07:31

On Mon, Aug 29, 2022 at 02:38:36PM -0700, Junio C Hamano wrote:
+--[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 [off-list ref]' --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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help