diff options
author | Stefan Beller <sbeller@google.com> | 2016-02-29 18:07:13 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-01 11:57:18 -0800 |
commit | a028a1930c6b4b848e8fb47cc92c30b23d99a75e (patch) | |
tree | 1a12e321f4beecfda8cf006c2da63ca2249a0bec /t/t5526-fetch-submodules.sh | |
parent | f73da11024adba18fe7443a420259ad07e0139d5 (diff) | |
download | git-a028a1930c6b4b848e8fb47cc92c30b23d99a75e.tar.gz git-a028a1930c6b4b848e8fb47cc92c30b23d99a75e.tar.xz |
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-x | t/t5526-fetch-submodules.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index 124114622..954d0e43f 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 |