summaryrefslogtreecommitdiff
path: root/t/t5526-fetch-submodules.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2016-03-01 02:07:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-01 19:57:18 (GMT)
commita028a1930c6b4b848e8fb47cc92c30b23d99a75e (patch)
tree1a12e321f4beecfda8cf006c2da63ca2249a0bec /t/t5526-fetch-submodules.sh
parentf73da11024adba18fe7443a420259ad07e0139d5 (diff)
downloadgit-a028a1930c6b4b848e8fb47cc92c30b23d99a75e.zip
git-a028a1930c6b4b848e8fb47cc92c30b23d99a75e.tar.gz
git-a028a1930c6b4b848e8fb47cc92c30b23d99a75e.tar.bz2
fetching submodules: respect `submodule.fetchJobs` config option
This allows to configure fetching and updating in parallel without having the command line option. This moved the responsibility to determine how many parallel processes to start from builtin/fetch to submodule.c as we need a way to communicate "The user did not specify the number of parallel processes in the command line options" in the builtin fetch. The submodule code takes care of the precedence (CLI > config > default). Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5526-fetch-submodules.sh')
-rwxr-xr-xt/t5526-fetch-submodules.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
index 1241146..954d0e4 100755
--- a/t/t5526-fetch-submodules.sh
+++ b/t/t5526-fetch-submodules.sh
@@ -471,4 +471,18 @@ test_expect_success "don't fetch submodule when newly recorded commits are alrea
test_i18ncmp expect.err actual.err
'
+test_expect_success 'fetching submodules respects parallel settings' '
+ git config fetch.recurseSubmodules true &&
+ (
+ cd downstream &&
+ GIT_TRACE=$(pwd)/trace.out git fetch --jobs 7 &&
+ grep "7 tasks" trace.out &&
+ git config submodule.fetchJobs 8 &&
+ GIT_TRACE=$(pwd)/trace.out git fetch &&
+ grep "8 tasks" trace.out &&
+ GIT_TRACE=$(pwd)/trace.out git fetch --jobs 9 &&
+ grep "9 tasks" trace.out
+ )
+'
+
test_done