summaryrefslogtreecommitdiff
path: root/t/t5526-fetch-submodules.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-02-23 23:39:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-28 20:57:51 (GMT)
commit9b2ac68f2763cf07dd969473c9eb06ab2f746ca6 (patch)
tree27fb9442fd8f91b800d9a52983dcd7ad843755f4 /t/t5526-fetch-submodules.sh
parentfa06eb6fa906f0b6e44046fe7b077d71ebb4d6e4 (diff)
downloadgit-9b2ac68f2763cf07dd969473c9eb06ab2f746ca6.zip
git-9b2ac68f2763cf07dd969473c9eb06ab2f746ca6.tar.gz
git-9b2ac68f2763cf07dd969473c9eb06ab2f746ca6.tar.bz2
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 <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5526-fetch-submodules.sh')
-rwxr-xr-xt/t5526-fetch-submodules.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
index a552ad4..ce44d8a 100755
--- a/t/t5526-fetch-submodules.sh
+++ b/t/t5526-fetch-submodules.sh
@@ -85,7 +85,7 @@ test_expect_success "fetch --recurse-submodules -j2 has the same output behaviou
add_upstream_commit &&
(
cd downstream &&
- GIT_TRACE=$(pwd)/../trace.out git fetch --recurse-submodules -j2 2>../actual.err
+ GIT_TRACE="$TRASH_DIRECTORY/trace.out" git fetch --recurse-submodules -j2 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err &&