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 <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Pete Wyckoff committed Jan 14, 2013 at 19:47 UTC af8c0092503f677afc9ea4070ebd9204133b83ab
1 file changed +5 -2
t/t9806-git-p4-options.sh
+5 -2
@@ -226,9 +226,11 @@ test_expect_success 'clone --use-client-spec' '
226 View: //depot/sub/... //client2/bus/...
227 EOF
228 ) &&
229 - P4CLIENT=client2 &&
229 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 + ) &&
234 (
235 cd "$git" &&
236 test_path_is_file bus/dir/f4 &&
@@ -241,6 +243,7 @@ test_expect_success 'clone --use-client-spec' '
243 cd "$git" &&
244 git init &&
245 git config git-p4.useClientSpec true &&
246 + P4CLIENT=client2 &&
247 git p4 sync //depot/... &&
248 git checkout -b master p4/master &&
249 test_path_is_file bus/dir/f4 &&