From: Bello Olamide Date: Fri, 23 Jan 2026 13:24:09 GMT Subject: Re: [Outreachy PATCH v3 2/3] environment: environment: stop using core.sparseCheckout globally Message-ID: In-Reply-To: <4f19e70f-8ab5-4322-ac71-76bc925b324a@gmail.com> On Fri, 23 Jan 2026 at 11:43, Phillip Wood wrote: > > On 22/01/2026 15:29, Bello Olamide wrote: > > On Thu, 22 Jan 2026 at 15:41, Phillip Wood wrote: > >> > >>> diff --git a/builtin/backfill.c b/builtin/backfill.c > >>> index e80fc1b694..5fc8c51ed1 100644 > >>> --- a/builtin/backfill.c > >>> +++ b/builtin/backfill.c > >>> @@ -139,7 +139,7 @@ int cmd_backfill(int argc, const char **argv, const char *prefix, struct reposit > >>> repo_config(repo, git_default_config, NULL); > >>> > >>> if (ctx.sparse < 0) > >>> - ctx.sparse = core_apply_sparse_checkout; > >>> + ctx.sparse = repo->config_values.sparse_checkout; > >> > >> Using "repo" rather than "the_repository" here is dangerous because only > >> "the_repository" contains the parsed config. This applies throughout > >> this patch. > > > > Okay noted... > > Sorry but I have a question. > > You don't need to be sorry for having a question - it shows you have > been thinking about the feedback you have received which is very good. Thank you > > > I observed that the address of "repo" is passed to builtin/backfill.c, > > is gotten from git.c:handle_builtin > > which passed run_builtin "the_repository" as a parameter. > > > > Won't the address of "repo" and "the_repository be the same"? > > Yes, but I think it is safer to explicitly say "the_repository" so that > if any of the functions you convert here are ever passed another > repository instance the code will keep working as expected. It also > documents that the config value is only stored in "the_repository". Once > we make these config values per-repository then we can use the > repository instance passed to the function. Okay thank you for clarifying.