diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2008-03-02 15:53:39 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-02 15:27:27 -0800 |
commit | 859c4fbef589841585f8f21cc567b7016681df7a (patch) | |
tree | 45761d48fcf8d116006f3bd5703a95ba71845efa /t/t4014-format-patch.sh | |
parent | 5d02294c776c46f0d454470c66c16fe9f08fad3d (diff) | |
download | git-859c4fbef589841585f8f21cc567b7016681df7a.tar.gz |
format-patch: wrap cover-letter's shortlog sensibly
Earlier, overly-long onelines would not be wrapped at all, and indented
with 6 spaces.
Instead, we now wrap around at 72 characters, with a first-line indent
of 2 spaces, and the rest with 4 spaces.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 6d86b7dd72..b2b7a8db85 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 |