diff options
author | Stefan Beller <sbeller@google.com> | 2016-02-29 18:07:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-01 11:57:20 -0800 |
commit | 2335b870fa7942d9ca9e73e96e35171fda741376 (patch) | |
tree | f76c7f7b8fcd2d4bcac7ec1f57f53eb079c2b1c0 /t/t7406-submodule-update.sh | |
parent | cdc04b65b4bc8094e082ac65a7dce75a7a990163 (diff) | |
download | git-2335b870fa7942d9ca9e73e96e35171fda741376.tar.gz |
submodule update: expose parallelism to the user
Expose possible parallelism either via the "--jobs" CLI parameter or
the "submodule.fetchJobs" setting.
By having the variable initialized to -1, we make sure 0 can be passed
into the parallel processing machine, which will then pick as many parallel
workers as there are CPUs.
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/t7406-submodule-update.sh')
-rwxr-xr-x | t/t7406-submodule-update.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index dda3929d99..7fd5142d6c 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -774,4 +774,16 @@ test_expect_success 'submodule update --recursive drops module name before recur test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual ) ' + +test_expect_success 'submodule update can be run in parallel' ' + (cd super2 && + GIT_TRACE=$(pwd)/trace.out git submodule update --jobs 7 && + grep "7 tasks" trace.out && + git config submodule.fetchJobs 8 && + GIT_TRACE=$(pwd)/trace.out git submodule update && + grep "8 tasks" trace.out && + GIT_TRACE=$(pwd)/trace.out git submodule update --jobs 9 && + grep "9 tasks" trace.out + ) +' test_done |