mbox series

[0/2] format-patch --force-inbody-from

Message ID 20220826213203.3258022-1-gitster@pobox.com (mailing list archive)
Headers show
Series format-patch --force-inbody-from | expand

Message

Junio C Hamano Aug. 26, 2022, 9:32 p.m. UTC
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.

The two-patch series may help such users.

 * The first one introduces a small helper to separate the logic
   that decides when in-body From: is used.

 * The second one adds a minimum support with a new test.

Junio C Hamano (2):
  pretty: separate out the logic to decide the use of in-body from
  format-patch: allow forcing the use of in-body From: header

 builtin/log.c           |  2 ++
 pretty.c                | 13 ++++++++++++-
 revision.h              |  1 +
 t/t4014-format-patch.sh | 13 +++++++++++++
 4 files changed, 28 insertions(+), 1 deletion(-)