diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-30 14:44:22 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-30 14:44:22 -0800 |
commit | 684d0d8dcfa2288744a553fc7294c5f9f5c12026 (patch) | |
tree | d790223199de25afa95aeb898d1b85d1e1dd3e1c /t | |
parent | Merge branch 'cc/bisect-doc' (diff) | |
parent | Pretty-format: %[+-]x to tweak inter-item newlines (diff) | |
download | tgif-684d0d8dcfa2288744a553fc7294c5f9f5c12026.tar.xz |
Merge branch 'jc/pretty-lf'
Conflicts:
pretty.c
t/t6006-rev-list-format.sh
Diffstat (limited to 't')
-rwxr-xr-x | t/t6006-rev-list-format.sh | 22 |
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 && |