path: root/t
diff options
authorDenton Liu <>2019-10-08 09:14:11 (GMT)
committerJunio C Hamano <>2019-10-09 01:44:40 (GMT)
commit756fb0dedb72e8eec691d216198ccc23102d7072 (patch)
tree6de27a6dcf47cd0bb12eb5c00788fa3e9e32b8db /t
parent50094ca45f27b8bf5f4c234b2f2643ecd61b8c86 (diff)
t4014: treat rev-list output as the expected value
In 6bd26f58ea (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 <> Signed-off-by: Denton Liu <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't')
1 files changed, 3 insertions, 2 deletions
diff --git a/t/ b/t/
index 83f5261..72b0989 100755
--- a/t/
+++ b/t/
@@ -1610,8 +1610,9 @@ test_expect_success 'format-patch format.outputDirectory option' '
test_config format.outputDirectory patches &&
rm -fr patches &&
git format-patch master..side &&
- git rev-list master..side >list &&
- test_line_count = $(ls patches | wc -l) list
+ count=$(git rev-list --count master..side) &&
+ ls patches >list &&
+ test_line_count = $count list
test_expect_success 'format-patch -o overrides format.outputDirectory' '