diff options
| author | Mirko Faina <mroik@delayed.space> | 2026-02-18 00:25:18 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-17 15:29:57 -0800 |
| commit | a8e89346a7731cb3104010f322c65e2a0c922618 (patch) | |
| tree | d2f2e3f3c878d2b3f5fb0ad3aa06f54592194fd0 /Documentation/git-format-patch.adoc | |
| parent | 67ad42147a7acc2af6074753ebd03d904476118f (diff) | |
| download | git-a8e89346a7731cb3104010f322c65e2a0c922618.tar.xz | |
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>
Diffstat (limited to 'Documentation/git-format-patch.adoc')
| -rw-r--r-- | Documentation/git-format-patch.adoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/git-format-patch.adoc b/Documentation/git-format-patch.adoc index 9a7807ca71..6ac453958c 100644 --- a/Documentation/git-format-patch.adoc +++ b/Documentation/git-format-patch.adoc @@ -282,11 +282,12 @@ e.g., `--rfc='-(WIP)'` results in "PATCH (WIP)". --from:: --from=<ident>:: - Use `ident` in the `From:` header of each commit email. If the - author ident of the commit is not textually identical to the - provided `ident`, place a `From:` header in the body of the - message with the original author. If no `ident` is given, use - the committer ident. + Use `ident` in the `From:` header of each email. In case of a + commit email, if the author ident of the commit is not textually + identical to the provided `ident`, place a `From:` header in the + body of the message with the original author. If no `ident` is + given, or if the option is not passed at all, use the ident of + the current committer. + Note that this option is only useful if you are actually sending the emails and want to identify yourself as the sender, but retain the |
