Re: [Outreachy PATCH v2] environment: move "core.attributesFile" into repo-setting
- From
Bello Olamide <belkid98@gmail.com>
- Date
- Jan 7, 2026, 15:33 UTC
- Message-ID
- <CAD=f0L9in5tjLNUcM86uzd_caTaZYre9RRygmizO4G=S_DBFRQ@mail.gmail.com>
- In-Reply-To
- <8899016f-eeef-404b-8da6-ff3a90e81cea@gmail.com>
On Wed, 7 Jan 2026 at 15:19, Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 33 quoted lines
> > On 07/01/2026 10:26, Phillip Wood wrote: > > On 06/01/2026 13:44, Bello Olamide wrote: > >> > >> But won't this be a temporary solution since the goal is to prevent > >> the use of > >> `the_repository`? > > > > Yes but it would be a good start as passing a repository down to > > git_default_config() will be quite invasive. > > To expand on this the first steps could be > (i) create a new struct to hold the config settings from > git_default_config() > (ii) add that struct as a member of `struct repository` > (iii) one-by-one, for each setting parsed by git_default_config() add a > new member to the config struct, store the parsed value in > `the_repository` and adjust any code that uses the variable. > > Then later we can tackle the intrusive change to pass a `struct > repository` down to git_default_config() and store the settings in that > rather than `the_repository`. If we add a local variable to > git_default_config() in step (iii) above then getting it to use the > repository passed down the call chain will simply be a matter of doing > something like > > - struct repository *r = the_repository; > + struct repository *r = cb ? cb : the_repository; > > Thanks > > Phillip >
Thanks for the detailed proposal, which makes a lot of sense. I’ll align my changes with this staged approach.
Bello