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

[PATCH v2 0/3] format-patch --force-in-body-from

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 29, 2022, 21:38 UTC
Message-ID
<20220829213837.13849-1-gitster@pobox.com>
In-Reply-To
<20220826213203.3258022-1-gitster@pobox.com>

Users may be authoring and committing their commits under the same e-mail address they use to send their patches from, in which case they shouldn't need to use the in-body From: line in their outgoing e-mails. At the receiving end, "git am" will use the address on the "From:" header of the incoming e-mail and all should be well.

Some mailing lists, however, mangle the From: address from what the original sender had; in such an unfortunate situation, the user may want to add the in-body "From:" header even for their own patch.

A new option `--force-in-body-from` from the command line of `git format-patch`, and a new configuration variable `format.forceInBodyFrom` that can be set per repository, are added to address this.

Changes since the original submission are
 * The configuration variable support is new.
 * comes with documentation updates.
 * "in-body" is spelled as such, not "inbody".
 * the order of config and option parsing plus initializing the
   rev_info structure dictates a separate variable to be used for
   the former two and then copied to rev_info later.
Junio C Hamano (3):
  pretty: separate out the logic to decide the use of in-body from
  format-patch: allow forcing the use of in-body From: header
  format-patch: learn format.forceInBodyFrom configuration variable
 Documentation/config/format.txt    |  4 ++++
 Documentation/git-format-patch.txt | 11 +++++++++
 builtin/log.c                      |  9 ++++++++
 pretty.c                           | 12 +++++++++-
 revision.h                         |  1 +
 t/t4014-format-patch.sh            | 37 ++++++++++++++++++++++++++++++
 6 files changed, 73 insertions(+), 1 deletion(-)
-- 
2.37.2-621-gd3a800faf0
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 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.