summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-30 14:44:22 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-30 14:44:22 -0800
commit684d0d8dcfa2288744a553fc7294c5f9f5c12026 (patch)
treed790223199de25afa95aeb898d1b85d1e1dd3e1c /t
parentMerge branch 'cc/bisect-doc' (diff)
parentPretty-format: %[+-]x to tweak inter-item newlines (diff)
downloadtgif-684d0d8dcfa2288744a553fc7294c5f9f5c12026.tar.xz
Merge branch 'jc/pretty-lf'
Conflicts: pretty.c t/t6006-rev-list-format.sh
Diffstat (limited to 't')
-rwxr-xr-xt/t6006-rev-list-format.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 7f61ab0e52..571931588e 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -162,6 +162,28 @@ test_expect_success 'empty email' '
}
'
+test_expect_success 'del LF before empty (1)' '
+ git show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD^^ >actual &&
+ test $(wc -l <actual) = 2
+'
+
+test_expect_success 'del LF before empty (2)' '
+ git show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD >actual &&
+ test $(wc -l <actual) = 6 &&
+ grep "^$" actual
+'
+
+test_expect_success 'add LF before non-empty (1)' '
+ git show -s --pretty=format:"%s%+b%nThanks%n" HEAD^^ >actual &&
+ test $(wc -l <actual) = 2
+'
+
+test_expect_success 'add LF before non-empty (2)' '
+ git show -s --pretty=format:"%s%+b%nThanks%n" HEAD >actual &&
+ test $(wc -l <actual) = 6 &&
+ grep "^$" actual
+'
+
test_expect_success '"%h %gD: %gs" is same as git-reflog' '
git reflog >expect &&
git log -g --format="%h %gD: %gs" >actual &&