summaryrefslogtreecommitdiff
path: root/t/t7406-submodule-update.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2016-03-01 02:07:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-01 19:57:20 (GMT)
commit2335b870fa7942d9ca9e73e96e35171fda741376 (patch)
treef76c7f7b8fcd2d4bcac7ec1f57f53eb079c2b1c0 /t/t7406-submodule-update.sh
parentcdc04b65b4bc8094e082ac65a7dce75a7a990163 (diff)
downloadgit-2335b870fa7942d9ca9e73e96e35171fda741376.zip
git-2335b870fa7942d9ca9e73e96e35171fda741376.tar.gz
git-2335b870fa7942d9ca9e73e96e35171fda741376.tar.bz2
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-xt/t7406-submodule-update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index dda3929..7fd5142 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