Skip to content

Commit 756fb0d

Browse files
Denton-Lgitster
authored andcommitted
t4014: treat rev-list output as the expected value
In 6bd26f5 (t4014: use test_line_count() where possible, 2019-08-27), we converted many test cases to take advantage of the test_line_count() function. In one conversion, we inverted the expected and actual value as tested by test_line_count(). Although functionally correct, if format-patch ever produced incorrect output, the debugging output would be a bunch of hashes which would be difficult to debug. Invert the expected and actual values provided to test_line_count() so that if format-patch produces incorrect output, the debugging output will be a list of human-readable files instead. Helped-by: SZEDER Gábor <[email protected]> Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 50094ca commit 756fb0d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t4014-format-patch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,8 +1610,9 @@ test_expect_success 'format-patch format.outputDirectory option' '
16101610
test_config format.outputDirectory patches &&
16111611
rm -fr patches &&
16121612
git format-patch master..side &&
1613-
git rev-list master..side >list &&
1614-
test_line_count = $(ls patches | wc -l) list
1613+
count=$(git rev-list --count master..side) &&
1614+
ls patches >list &&
1615+
test_line_count = $count list
16151616
'
16161617

16171618
test_expect_success 'format-patch -o overrides format.outputDirectory' '

0 commit comments

Comments
 (0)