Skip to content

Commit

Permalink
Rollup merge of #42208 - Mark-Simulacrum:shallow-submodules, r=aidanhs
Browse files Browse the repository at this point in the history
Make submodule clones shallow to avoid work.

This hopefully makes the situation on AppVeyor at least a little better.

r? @aidanhs
  • Loading branch information
Mark-Simulacrum authored May 25, 2017
2 parents af74add + da2b86f commit 3223da4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ci/init_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ ! -d "$cache_src_dir/.git" ]; then
fi
retry sh -c "cd $cache_src_dir && git reset --hard && git pull"
retry sh -c "cd $cache_src_dir && \
git submodule deinit -f . && git submodule sync && git submodule update --init"
git submodule deinit -f . && git submodule sync && git submodule update --depth 1 --init"

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

0 comments on commit 3223da4

Please sign in to comment.