summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d02294)
raw | patch | inline | side by side (parent: 5d02294)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 2 Mar 2008 15:53:39 +0000 (15:53 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 2 Mar 2008 23:27:27 +0000 (15:27 -0800) |
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>
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>
builtin-log.c | patch | blob | history | |
t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ | patch | blob | history | |
t/t4014-format-patch.sh | patch | blob | history |
diff --git a/builtin-log.c b/builtin-log.c
index fd9b3ae95ea8da03780f93382dd817a11cdbb9f3..fe8fc6f22a176a017c65ac6177f0bab890d8fce5 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
strbuf_release(&sb);
shortlog_init(&log);
+ log.wrap_lines = 1;
+ log.wrap = 72;
+ log.in1 = 2;
+ log.in2 = 4;
for (i = 0; i < nr; i++)
shortlog_add_commit(&log, list[i]);
diff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
index 0151453b73c3f57f8594d550b3118616b423b4d2..8dab4bf93ebd5f3e5ee6e899890d6e53af9ab967 100644 (file)
*** BLURB HERE ***
A U Thor (2):
- Second
- Third
+ Second
+ Third
dir/sub | 4 ++++
file0 | 3 +++
index 6d86b7dd7293cbff093944a01931a5e61ccfe926..b2b7a8db859fe7f5d8c74fb27b77e4eba583ebc4 100755 (executable)
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
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