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

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
Previous: Junio C HamanoNext: Jeff King
Message 11 of 13 in “format-patch --force-inbody-from”
  1. 0/2 format-patch --force-inbody-fromJunio C Hamano, Aug 26, 2022
  2. 1/2 pretty: separate out the logic to decide the use of in-body fromJunio C Hamano, Aug 26, 2022
  3. Johannes SchindelinAug 29, 2022
  4. Junio C HamanoAug 29, 2022
  5. 2/2 format-patch: allow forcing the use of in-body From: headerJunio C Hamano, Aug 26, 2022
  6. Johannes SchindelinAug 29, 2022
  7. Junio C HamanoAug 29, 2022
  8. 0/3 format-patch --force-in-body-fromJunio C Hamano, Aug 29, 2022
  9. 1/3 pretty: separate out the logic to decide the use of in-body fromJunio C Hamano, Aug 29, 2022
  10. 2/3 format-patch: allow forcing the use of in-body From: headerJunio C Hamano, Aug 29, 2022
  11. Jeff KingAug 30, 2022
  12. Jeff KingAug 30, 2022
  13. 3/3 format-patch: learn format.forceInBodyFrom configuration variableJunio C Hamano, Aug 29, 2022

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.