git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] submodule-config: fix reading submodule.fetchJobs

From
Saagar Jha <saagar@saagarjha.com>
Date
May 3, 2026, 11:24 UTC
Message-ID
<AAB01B60-F569-49C7-916D-A03549E6C210@saagarjha.com>
In-Reply-To
<CAN5EUNT27bYwjdXRQTffbtHFpkV68rAajqgXtbKHu6OjhzG_mA@mail.gmail.com>
Hi Pablo! I figured the change was simple enough to be self-explanatory, but I expanded the description to indicate what the bug was. Let me know if there’s anything else you’d like me to fix (I agree that the CI failure is probably not related to my change, but I can try my hand at looking at it after if nobody has?)
Show 80 quoted lines
> On May 3, 2026, at 04:07, Pablo <pabloosabaterr@gmail.com> wrote:
> 
> El dom, 3 may 2026 a las 12:14, Saagar Jha via GitGitGadget
> (<gitgitgadget@gmail.com>) escribió:
>> 
>> From: Saagar Jha <saagar@saagarjha.com>
>> 
>> Signed-off-by: Saagar Jha <saagar@saagarjha.com>
>> ---
>>    submodule-config: fix reading submodule.fetchJobs
>> 
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2287%2Fsaagarjha%2Fmaint-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2287/saagarjha/maint-v1
>> Pull-Request: https://github.com/git/git/pull/2287
>> 
>> submodule-config.c          |  2 +-
>> t/t7406-submodule-update.sh | 10 ++++++++++
>> 2 files changed, 11 insertions(+), 1 deletion(-)
>> 
>> diff --git a/submodule-config.c b/submodule-config.c
>> index 1f19fe2077..57b190678e 100644
>> --- a/submodule-config.c
>> +++ b/submodule-config.c
>> @@ -1037,5 +1037,5 @@ static int gitmodules_update_clone_config(const char *var, const char *value,
>> 
>> void update_clone_config_from_gitmodules(int *max_jobs)
>> {
>> -       config_from_gitmodules(gitmodules_update_clone_config, the_repository, &max_jobs);
>> +       config_from_gitmodules(gitmodules_update_clone_config, the_repository, max_jobs);
>> }
>> diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
>> index 3adab12091..234a021fb3 100755
>> --- a/t/t7406-submodule-update.sh
>> +++ b/t/t7406-submodule-update.sh
>> @@ -1055,6 +1055,16 @@ test_expect_success 'submodule update can be run in parallel' '
>>        )
>> '
>> 
>> +test_expect_success 'submodule update honors fetch jobs config from .gitmodules' '
>> +       test_when_finished "rm -rf super3" &&
>> +       git clone cloned super3 &&
>> +       (cd super3 &&
>> +        git config -f .gitmodules submodule.fetchJobs 67 &&
>> +        GIT_TRACE="$(pwd)/trace.out" git submodule update --init &&
>> +        grep "67 tasks" trace.out
>> +       )
>> +'
>> +
>> test_expect_success 'git clone passes the parallel jobs config on to submodules' '
>>        test_when_finished "rm -rf super4" &&
>>        GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules --jobs 7 . super4 &&
>> 
>> base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
>> --
>> gitgitgadget
>> 
> 
> Hi Saagar!
> 
> A few hints before this can be reviewable:
> - There is no commit body which, not only is a must, it makes it very
> hard reviewing because I cannot know what you wanted to do and I have
> to imagine it.
> - CI tests seem to be failing, but the file that reports fail doesn't
> seem to be related with your changes.
> 
> About the code, I can understand the 'why': the function above
> 'fetch_config_from_gitmodules' builds an struct inside and sends the
> address &config, 'update_clone_config_from_gitmodules' calls the same
> function with &max_jobs but the error would be that max_jobs is
> already a pointer so there would be no need to pass by reference
> max_jobs.
> 
> But this kind of explanation is what should be on the commit body.
> Maybe not this technical as the code can be easily seen, but a high
> level explanation about what this is.
> 
> Looking forward for a v2,
> --
> Pablo
Previous: PabloNext: Pablo
Message 3 of 9 in “submodule-config: fix reading submodule.fetchJobs”
  1. submodule-config: fix reading submodule.fetchJobsSaagar Jha via GitGitGadget, May 3, 2026
  2. PabloMay 3, 2026
  3. Saagar JhaMay 3, 2026
  4. PabloMay 3, 2026
  5. submodule-config: fix reading submodule.fetchJobsSaagar Jha via GitGitGadget, May 3, 2026
  6. PabloMay 3, 2026
  7. Junio C HamanoMay 10, 2026
  8. submodule-config: fix reading submodule.fetchJobsSaagar Jha via GitGitGadget, May 3, 2026
  9. submodule-config: fix reading submodule.fetchJobsSaagar Jha via GitGitGadget, May 10, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.