X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4014-format-patch.sh;h=b2b7a8db859fe7f5d8c74fb27b77e4eba583ebc4;hb=a1c0dca43a3513574e5bebb38989671960cdaf35;hp=6d86b7dd7293cbff093944a01931a5e61ccfe926;hpb=5d02294c776c46f0d454470c66c16fe9f08fad3d;p=git.git diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 6d86b7dd7..b2b7a8db8 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -211,4 +211,23 @@ test_expect_success 'cover-letter inherits diff options' ' grep "file => foo .* 0 *$" 0000-cover-letter.patch ' + +cat > expect << EOF + This is an excessively long subject line for a message due to the + habit some projects have of not having a short, one-line subject at + the start of the commit message, but rather sticking a whole + paragraph right at the start as the only thing in the commit + message. It had better not become the filename for the patch. + foo + +EOF + +test_expect_success 'shortlog of cover-letter wraps overly-long onelines' ' + + git format-patch --cover-letter -2 && + sed -e "1,/A U Thor/d" -e "/^$/q" < 0000-cover-letter.patch > output && + git diff expect output + +' + test_done