]> Kevux Git Server - rit/commit
format-patch: fix From header in cover letter
authorMirko Faina <mroik@delayed.space>
Tue, 17 Feb 2026 23:25:18 +0000 (00:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Feb 2026 23:29:57 +0000 (15:29 -0800)
commita8e89346a7731cb3104010f322c65e2a0c922618
treed2f2e3f3c878d2b3f5fb0ad3aa06f54592194fd0
parent67ad42147a7acc2af6074753ebd03d904476118f
format-patch: fix From header in cover letter

"git format-patch" takes "--from=<user ident>" command line option
and uses the given ident for patch e-mails, but this is not applied
to the cover letter, the option is ignored and the committer ident
of the current user is used. This has been the case ever since
"--from" was introduced in a9080475 (teach format-patch to place
other authors into in-body "From", 2013-07-03).

Teach the make_cover_letter() function to honor the option, instead of
always using the current committer identity. Change variable name from
"committer" to "from" to better reflect the purpose of the variable.

Signed-off-by: Mirko Faina <mroik@delayed.space>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-format-patch.adoc
builtin/log.c
t/t4014-format-patch.sh