Subject: Re: [GSOC PATCH v6 0/3] environment: remove sparse-checkout related global variables

From: Junio C Hamano <[email-masked]>
Date: Wed, 30 Jul 2025 08:52:34 -0700

Phillip Wood <[email-masked]> writes:

> ... I wonder if instead we could change git_default_config() to expect
> a repository pointer as the callback data and use that to initialize
> things. That would mean that we would not need to move code out of
> git_default_config() to remove global variables and we would retain
> the "last one wins" behavior when two or more config keys such are
> "merge.log" and "merge.summary" set the same variable. It would be
> fairly invasive though as we'd need to pass the repository pointer
> down through all the other callbacks that end up calling
> git_default_config().

Sounds very painful, but it does sound like something worthwhile to
do.

Thanks.