From da2b86fa71b3ff416b24707a6d6c7e6b85fa1af4 Mon Sep 17 00:00:00 2001 From: Mark Simulacrum Date: Wed, 24 May 2017 17:59:03 -0600 Subject: [PATCH] Make submodule clones shallow to avoid work. This hopefully makes the situation on AppVeyor at least a little better. --- src/ci/init_repo.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 1db2135eb6d86..a68923590a6a5 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -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" @@ -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