Skip to content

Commit 561caae

Browse files
committed
fix fetch-submodules.sh for older git
1 parent e631350 commit 561caae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/fetch-submodules.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ done
1616
echo ${abs_submodules}
1717

1818
# Fetch submodules as partial clones if possible. If that fails due to an older version of git,
19-
# do a shallow init with no fetch and then check out the proper commit.
19+
# do a shallow init and fetch tags.
2020
git submodule update --init --filter=blob:none ${abs_submodules} || \
21-
git submodule update --init --no-fetch --depth 1 ${abs_submodules} || \
22-
git submodule foreach $* \
23-
'git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1' || \
21+
git submodule update --init --depth 1 ${abs_submodules} && \
22+
git submodule foreach 'git fetch --tags --depth 1' || \
2423
echo "ERROR: fetch-submodules.sh FAILED"

0 commit comments

Comments
 (0)