From: Junio C Hamano Date: Tue, 07 Mar 2023 17:55:43 GMT Subject: Re: [PATCH v9 6/6] diff-lib: parallelize run_diff_files for submodules Message-ID: In-Reply-To: <230307.865ybc273g.gmgdl@evledraar.gmail.com> Ævar Arnfjörð Bjarmason writes: > On Thu, Mar 02 2023, Calvin Wan wrote: > >> + if (git_config_get_ulong("submodule.diffjobs", ¶llel_jobs)) >> + parallel_jobs = 1; > > Something I missed when eyeballing this in my just-sent review, here we > have a "revs->repo" already, so let's not fall back on "the_repository", > but use it. I think you want this as a fix-up: > > diff --git a/diff-lib.c b/diff-lib.c > index 925d64ff58c..ec8a0f98085 100644 > --- a/diff-lib.c > +++ b/diff-lib.c > @@ -312,7 +312,8 @@ int run_diff_files(struct rev_info *revs, unsigned int option) > unsigned long parallel_jobs; > struct string_list_item *item; > > - if (git_config_get_ulong("submodule.diffjobs", ¶llel_jobs)) > + if (repo_config_get_ulong(revs->repo, "submodule.diffjobs", > + ¶llel_jobs)) > parallel_jobs = 1; > else if (!parallel_jobs) > parallel_jobs = online_cpus(); Good eyes. Thanks for a careful review.