Merge branch 'sb/submodule-fetchjobs-default-to-one'
authorJunio C Hamano <gitster@pobox.com>
Fri, 18 Jan 2019 21:49:52 +0000 (13:49 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jan 2019 21:49:52 +0000 (13:49 -0800)
"git submodule update" ought to use a single job unless asked, but
by mistake used multiple jobs, which has been fixed.

* sb/submodule-fetchjobs-default-to-one:
submodule update: run at most one fetch job unless otherwise set

builtin/submodule--helper.c
t/t5526-fetch-submodules.sh
index b45514be317eafb765a8943241b5d880f65e3117..0c5b2eb5fc6bb7553b71dac5f16d04e312093ae0 100644 (file)
@@ -1552,7 +1552,7 @@ struct submodule_update_clone {
 #define SUBMODULE_UPDATE_CLONE_INIT {0, MODULE_LIST_INIT, 0, \
        SUBMODULE_UPDATE_STRATEGY_INIT, 0, 0, -1, STRING_LIST_INIT_DUP, 0, \
        NULL, NULL, NULL, \
-       NULL, 0, 0, 0, NULL, 0, 0, 0}
+       NULL, 0, 0, 0, NULL, 0, 0, 1}
 
 
 static void next_submodule_warn_missing(struct submodule_update_clone *suc,
index 6c2f9b2ba266ad910769745e72285a840b33238b..a0317556c690262e26ed99cd902ec30c8adda733 100755 (executable)
@@ -524,6 +524,8 @@ test_expect_success 'fetching submodules respects parallel settings' '
        git config fetch.recurseSubmodules true &&
        (
                cd downstream &&
+               GIT_TRACE=$(pwd)/trace.out git fetch &&
+               grep "1 tasks" trace.out &&
                GIT_TRACE=$(pwd)/trace.out git fetch --jobs 7 &&
                grep "7 tasks" trace.out &&
                git config submodule.fetchJobs 8 &&