Skip to content

Commit 3223da4

Browse files
Rollup merge of #42208 - Mark-Simulacrum:shallow-submodules, r=aidanhs
Make submodule clones shallow to avoid work. This hopefully makes the situation on AppVeyor at least a little better. r? @aidanhs
2 parents af74add + da2b86f commit 3223da4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ci/init_repo.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [ ! -d "$cache_src_dir/.git" ]; then
6565
fi
6666
retry sh -c "cd $cache_src_dir && git reset --hard && git pull"
6767
retry sh -c "cd $cache_src_dir && \
68-
git submodule deinit -f . && git submodule sync && git submodule update --init"
68+
git submodule deinit -f . && git submodule sync && git submodule update --depth 1 --init"
6969

7070
# Cache was updated without errors, mark it as valid
7171
touch "$cache_valid_file"
@@ -78,9 +78,9 @@ modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)
7878
for module in $modules; do
7979
if [ ! -d "$cache_src_dir/$module" ]; then
8080
echo "WARNING: $module not found in pristine repo"
81-
retry sh -c "git submodule deinit -f $module && git submodule update --init $module"
81+
retry sh -c "git submodule deinit -f $module && git submodule update --depth 1 --init $module"
8282
continue
8383
fi
8484
retry sh -c "git submodule deinit -f $module && \
85-
git submodule update --init --reference $cache_src_dir/$module $module"
85+
git submodule update --init --depth 1 --reference $cache_src_dir/$module $module"
8686
done

0 commit comments

Comments
 (0)