diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-02-27 15:11:53 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-27 15:11:54 -0800 |
| commit | d64a20a1b185082fa6fc83b339f922f95fa45bdc (patch) | |
| tree | 87d874fcd741669fe631aa95c980cd7a9b5e6ee0 /t | |
| parent | c0d0b8daedd336677ed30bfb6bb7cdc6c47a468a (diff) | |
| parent | a8e89346a7731cb3104010f322c65e2a0c922618 (diff) | |
| download | git-d64a20a1b185082fa6fc83b339f922f95fa45bdc.tar.xz | |
Merge branch 'mf/format-patch-honor-from-for-cover-letter'
"git format-patch --from=<me>" did not honor the command line
option when writing out the cover letter, which has been corrected.
* mf/format-patch-honor-from-for-cover-letter:
format-patch: fix From header in cover letter
Diffstat (limited to 't')
| -rwxr-xr-x | t/t4014-format-patch.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 21d6d0cd9e..2135b65cee 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1472,6 +1472,14 @@ test_expect_success '--from uses committer ident' ' test_cmp expect patch.head ' +test_expect_success '--from applies to cover letter' ' + test_when_finished "rm -rf patches" && + git format-patch -1 --cover-letter --from="Foo Bar <author@example.com>" -o patches && + echo "From: Foo Bar <author@example.com>" >expect && + grep "^From:" patches/0000-cover-letter.patch >patch.head && + test_cmp expect patch.head +' + test_expect_success '--from omits redundant in-body header' ' git format-patch -1 --stdout --from="A U Thor <author@example.com>" >patch && cat >expect <<-\EOF && |
