From: Phillip Wood Date: Wed, 07 Jan 2026 14:18:57 GMT Subject: Re: [Outreachy PATCH v2] environment: move "core.attributesFile" into repo-setting Message-ID: <8899016f-eeef-404b-8da6-ff3a90e81cea@gmail.com> In-Reply-To: <922629dc-828c-4bdf-939c-b38b7b59e8e8@gmail.com> 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