Skip to content

Commit 094c641

Browse files
committed
submodule-config: fix reading submodule.fetchJobs
Signed-off-by: Saagar Jha <saagar@saagarjha.com>
1 parent 67ad421 commit 094c641

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

submodule-config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,5 +1037,5 @@ static int gitmodules_update_clone_config(const char *var, const char *value,
10371037

10381038
void update_clone_config_from_gitmodules(int *max_jobs)
10391039
{
1040-
config_from_gitmodules(gitmodules_update_clone_config, the_repository, &max_jobs);
1040+
config_from_gitmodules(gitmodules_update_clone_config, the_repository, max_jobs);
10411041
}

t/t7406-submodule-update.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,16 @@ test_expect_success 'submodule update can be run in parallel' '
10551055
)
10561056
'
10571057

1058+
test_expect_success 'submodule update honors fetch jobs config from .gitmodules' '
1059+
test_when_finished "rm -rf super3" &&
1060+
git clone cloned super3 &&
1061+
(cd super3 &&
1062+
git config -f .gitmodules submodule.fetchJobs 67 &&
1063+
GIT_TRACE="$(pwd)/trace.out" git submodule update --init &&
1064+
grep "67 tasks" trace.out
1065+
)
1066+
'
1067+
10581068
test_expect_success 'git clone passes the parallel jobs config on to submodules' '
10591069
test_when_finished "rm -rf super4" &&
10601070
GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules --jobs 7 . super4 &&

0 commit comments

Comments
 (0)