]> Kevux Git Server - rit/commitdiff
t4211: ensure that log respects --output=<file>
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 22 Jun 2016 15:02:13 +0000 (17:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jun 2016 22:20:47 +0000 (15:20 -0700)
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>
t/t4211-line-log.sh

index 4451127..9d87777 100755 (executable)
@@ -99,4 +99,11 @@ test_expect_success '-L with --first-parent and a merge' '
        git log --first-parent -L 1,1:b.c
 '
 
+test_expect_success '-L with --output' '
+       git checkout parallel-change &&
+       git log --output=log -L :main:b.c >output &&
+       test ! -s output &&
+       test_line_count = 70 log
+'
+
 test_done