Skip to content

Commit 91538d0

Browse files
szedergitster
authored andcommitted
t5570-git-daemon: don't check the stderr of a subshell
The test 'no-op fetch without "-v" is quiet' in 't5570-git-daemon.sh' fails when the test script is run with '-x' tracing (and using a shell other than a Bash version supporting BASH_XTRACEFD). The reason for the failure is that the test checks the emptiness of a subshell's stderr, which includes the trace of commands executed in that subshell as well, throwing off the emptiness check. Save the stderr of 'git fetch' only instead of the whole subshell's, so it remains free from tracing output. After this change t5570 passes with '-x', even when running with /bin/sh. Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9b2ac68 commit 91538d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5570-git-daemon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test_expect_success 'no-op fetch -v stderr is as expected' '
5050
'
5151

5252
test_expect_success 'no-op fetch without "-v" is quiet' '
53-
(cd clone && git fetch) 2>stderr &&
53+
(cd clone && git fetch 2>../stderr) &&
5454
! test -s stderr
5555
'
5656

0 commit comments

Comments
 (0)