Skip to content

Commit 9b2ac68

Browse files
szedergitster
authored andcommitted
t5526: use $TRASH_DIRECTORY to specify the path of GIT_TRACE log file
The test 'fetch --recurse-submodules -j2 has the same output behaviour' in 't5526-fetch-submodules.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 of that failure is the following command: GIT_TRACE=$(pwd)/../trace.out git fetch <...> 2>../actual.err because the trace of executing 'pwd' in the command substitution ends up in 'actual.err' as well, throwing off the subsequent 'test_i18ncmp'. Use $TRASH_DIRECTORY to specify the path of the GIT_TRACE log file instead of $(pwd), so the command's stderr remains free from tracing output. After this change t5526 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 fa06eb6 commit 9b2ac68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5526-fetch-submodules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ test_expect_success "fetch --recurse-submodules -j2 has the same output behaviou
8585
add_upstream_commit &&
8686
(
8787
cd downstream &&
88-
GIT_TRACE=$(pwd)/../trace.out git fetch --recurse-submodules -j2 2>../actual.err
88+
GIT_TRACE="$TRASH_DIRECTORY/trace.out" git fetch --recurse-submodules -j2 2>../actual.err
8989
) &&
9090
test_must_be_empty actual.out &&
9191
test_i18ncmp expect.err actual.err &&

0 commit comments

Comments
 (0)