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>
This commit is contained in:
committed by
Junio C Hamano
parent
f73da11024
commit
a028a1930c
@ -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
|
||||
|
||||
Reference in New Issue
Block a user