summaryrefslogtreecommitdiff
path: root/t/t7201-co.sh
diff options
context:
space:
mode:
authorLibravatar Charvi Mendiratta <charvi077@gmail.com>2020-10-20 17:13:18 +0530
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-10-22 10:37:57 -0700
commit627f2d79de1ac0d5a1cdf6a9dcf5c95e17b77b3a (patch)
tree956d3c098bc353e07e770f5ac7908e1f693bffd0 /t/t7201-co.sh
parentt7102,t7201: remove whitespace after redirect operator (diff)
downloadtgif-627f2d79de1ac0d5a1cdf6a9dcf5c95e17b77b3a.tar.xz
t7201: use 'git -C' to avoid subshell
Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7201-co.sh')
-rwxr-xr-xt/t7201-co.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 74553f991b..5898182fd2 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' '
git checkout master &&
mkdir subs &&
- (
- cd subs &&
- git checkout side
- ) &&
+ git -C subs checkout side &&
! test -f subs/one &&
rm -fr subs
'
@@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' '
git checkout master &&
mkdir -p subs &&
- (
- cd subs &&
- git checkout side -- bero
- ) &&
+ git -C subs checkout side -- bero &&
test -f subs/bero
'