diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-05-02 02:20:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-02 03:55:00 (GMT) |
commit | 50cd54ef4e6f4279683b61417a35de7297b55b9d (patch) | |
tree | 46534a0cfe9d7ff0c7269c9d77ff751e6758737e /t/t4014-format-patch.sh | |
parent | 468165c1d8a442994a825f3684528361727cd8c0 (diff) | |
download | git-50cd54ef4e6f4279683b61417a35de7297b55b9d.zip git-50cd54ef4e6f4279683b61417a35de7297b55b9d.tar.gz git-50cd54ef4e6f4279683b61417a35de7297b55b9d.tar.bz2 |
format-patch: make cover letters always text/plain
When formatting a series of patches using --attach and --cover-letter,
the cover letter lacks the closing MIME boundary, violating RFC 2046.
Certain clients, such as Thunderbird, discard the message body in such a
case.
Since the cover letter is just one part and sending it as
multipart/mixed is not very useful, always emit it as text/plain,
avoiding the boundary problem altogether.
Reported-by: Patrick Hemmer <git@stormcloud9.net>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-x | t/t4014-format-patch.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 482112c..6ea08fd 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1661,6 +1661,15 @@ test_expect_success 'format-patch --base with --attach' ' test_write_lines 1 2 >expect && test_cmp expect actual ' +test_expect_success 'format-patch --attach cover-letter only is non-multipart' ' + test_when_finished "rm -fr patches" && + git format-patch -o patches --cover-letter --attach=mimemime --base=HEAD~ -1 && + ! egrep "^--+mimemime" patches/0000*.patch && + egrep "^--+mimemime$" patches/0001*.patch >output && + test_line_count = 2 output && + egrep "^--+mimemime--$" patches/0001*.patch >output && + test_line_count = 1 output +' test_expect_success 'format-patch --pretty=mboxrd' ' sp=" " && |