Skip to content

Commit fbce03d

Browse files
peffgitster
authored andcommitted
t4018: drop "debugging" cat from hunk-header tests
We run a series of hunk-header tests in a loop, and each one does this: test_when_finished 'cat actual' && # for debugging only This is pretty pointless. When the test succeeds, we waste time running a useless cat process. If you're debugging a failure with "-i", then we won't run the when-finished part at all. So it helps only if you're running with something like "--verbose-log". Since we expect the tests to succeed most of the time, a better way to do this would be a helper that checks the output and dumps "actual" only when it fails. But it's probably not even worth the effort, as anyone debugging a failure could just run with "-i" and investigate the "actual" file themselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent b6d4d82 commit fbce03d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

t/t4018-diff-funcname.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ do
105105
result=success
106106
fi
107107
test_expect_$result "hunk header: $i" "
108-
test_when_finished 'cat actual' && # for debugging only
109108
git diff -U1 $i >actual &&
110109
grep '@@ .* @@.*RIGHT' actual
111110
"

0 commit comments

Comments
 (0)