Skip to content

Commit 8923d2d

Browse files
committed
Merge branch 'sb/cd-then-git-can-be-written-as-git-c' into next
Test clean-up. * sb/cd-then-git-can-be-written-as-git-c: lib-submodule-update.sh: reduce use of subshell by using "git -C"
2 parents 9f500d6 + 3290fe6 commit 8923d2d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

t/lib-submodule-update.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ create_lib_submodule_repo () {
6969

7070
git checkout -b "replace_sub1_with_directory" "add_sub1" &&
7171
git submodule update &&
72-
(
73-
cd sub1 &&
74-
git checkout modifications
75-
) &&
72+
git -C sub1 checkout modifications &&
7673
git rm --cached sub1 &&
7774
rm sub1/.git* &&
7875
git config -f .gitmodules --remove-section "submodule.sub1" &&

0 commit comments

Comments
 (0)