Skip to content

Commit c149693

Browse files
dschogitster
authored andcommitted
t4211: ensure that log respects --output=<file>
The test script t4202-log.sh is already pretty long, and it is a good idea to test --output with a more obscure option, anyway. So let's test it in conjunction with line-log. The most important part of this test, of course, is to ensure that the file is not closed after writing the diff, but only at the very end of the log output. That is the entire reason why the test tries to generate a log that covers more than one commit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 7f7d712 commit c149693

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/t4211-line-log.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,11 @@ test_expect_success '-L with --first-parent and a merge' '
9999
git log --first-parent -L 1,1:b.c
100100
'
101101

102+
test_expect_success '-L with --output' '
103+
git checkout parallel-change &&
104+
git log --output=log -L :main:b.c >output &&
105+
test ! -s output &&
106+
test_line_count = 70 log
107+
'
108+
102109
test_done

0 commit comments

Comments
 (0)