From: Junio C Hamano Date: Tue, 13 Jan 2026 19:38:20 GMT Subject: Re: [Outreachy PATCH v2 2/3] environment: environment: stop using core.sparseCheckout globally Message-ID: In-Reply-To: <1e83c077f274d73aebe183ae61157593f4a358c2.1768318762.git.belkid98@gmail.com> Olamide Caleb Bello writes: > diff --git a/builtin/backfill.c b/builtin/backfill.c > index e80fc1b694..90d5312240 100644 > --- a/builtin/backfill.c > +++ b/builtin/backfill.c > @@ -1,4 +1,3 @@ > -/* We need this macro to access core_apply_sparse_checkout */ Why this removal? You'll need to be able to access the_repository because ... > #define USE_THE_REPOSITORY_VARIABLE > > #include "builtin.h" > @@ -139,7 +138,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; > > result = do_backfill(&ctx); > backfill_context_clear(&ctx); > diff --git a/builtin/clone.c b/builtin/clone.c > index b19b302b06..b6b19e83d1 100644 > --- a/builtin/clone.c > +++ b/builtin/clone.c > @@ -623,7 +623,7 @@ static int git_sparse_checkout_init(const char *repo) > * We must apply the setting in the current process > * for the later checkout to use the sparse-checkout file. > */ > - core_apply_sparse_checkout = 1; > + the_repository->config_values.sparse_checkout = 1; ... you'd need to access this, even if it is now called slightly differently, no?