Skip to content

Commit

Permalink
Merge branch 'sb/submodule-fetchjobs-default-to-one'
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
gitster committed Jan 18, 2019
2 parents 9c51ad5 + e3a9d1a commit 4744d03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/submodule--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions t/t5526-fetch-submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 4744d03

Please sign in to comment.