Skip to content

Commit af8c009

Browse files
Pete Wyckoffgitster
authored andcommitted
git p4 test: keep P4CLIENT changes inside subshells
Tests assume that this is set to something valid. Make sure that the 'clone --use-client-spec' does not leak its changes out into the rest of the tests. Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8c9e8b6 commit af8c009

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

t/t9806-git-p4-options.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,11 @@ test_expect_success 'clone --use-client-spec' '
226226
View: //depot/sub/... //client2/bus/...
227227
EOF
228228
) &&
229-
P4CLIENT=client2 &&
230229
test_when_finished cleanup_git &&
231-
git p4 clone --dest="$git" --use-client-spec //depot/... &&
230+
(
231+
P4CLIENT=client2 &&
232+
git p4 clone --dest="$git" --use-client-spec //depot/...
233+
) &&
232234
(
233235
cd "$git" &&
234236
test_path_is_file bus/dir/f4 &&
@@ -241,6 +243,7 @@ test_expect_success 'clone --use-client-spec' '
241243
cd "$git" &&
242244
git init &&
243245
git config git-p4.useClientSpec true &&
246+
P4CLIENT=client2 &&
244247
git p4 sync //depot/... &&
245248
git checkout -b master p4/master &&
246249
test_path_is_file bus/dir/f4 &&

0 commit comments

Comments
 (0)