public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail•com>
To: Bello Olamide <belkid98@gmail•com>, Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org,
	Christian Couder <christian.couder@gmail•com>,
	Usman Akinyemi <usmanakinyemi202@gmail•com>,
	Kaartic Sivaraam <kaartic.sivaraam@gmail•com>,
	Taylor Blau <me@ttaylorr•com>,
	Karthik Nayak <karthik.188@gmail•com>
Subject: Re: [Outreachy PATCH v2] environment: move "core.attributesFile" into repo-setting
Date: Wed, 7 Jan 2026 14:18:57 +0000	[thread overview]
Message-ID: <8899016f-eeef-404b-8da6-ff3a90e81cea@gmail.com> (raw)
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


  reply	other threads:[~2026-01-07 14:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18  8:30 [Outreachy PATCH] environment: move "core.attributesFile" into repo-setting Olamide Caleb Bello
2025-12-18 17:31 ` Bello Olamide
2026-01-02  8:01 ` Bello Olamide
2026-01-02  8:49   ` Karthik Nayak
2026-01-02  8:48 ` Karthik Nayak
2026-01-02 11:26   ` Bello Olamide
2026-01-02 16:32 ` [Outreachy PATCH v2] " Olamide Caleb Bello
2026-01-05 11:09   ` Karthik Nayak
2026-01-05 11:39     ` Bello Olamide
2026-01-05 14:23   ` Phillip Wood
2026-01-05 15:00     ` Phillip Wood
2026-01-05 22:28       ` Junio C Hamano
2026-01-06  9:33         ` Bello Olamide
2026-01-06 13:44           ` Bello Olamide
2026-01-07 10:26             ` Phillip Wood
2026-01-07 14:18               ` Phillip Wood [this message]
2026-01-07 15:33                 ` Bello Olamide
2026-01-06  8:09       ` Bello Olamide
2026-01-05 22:24     ` Junio C Hamano
2026-01-07 10:17       ` Phillip Wood
2026-01-06  8:08     ` Bello Olamide

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8899016f-eeef-404b-8da6-ff3a90e81cea@gmail.com \
    --to=phillip.wood123@gmail$(echo .)com \
    --cc=belkid98@gmail$(echo .)com \
    --cc=christian.couder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=kaartic.sivaraam@gmail$(echo .)com \
    --cc=karthik.188@gmail$(echo .)com \
    --cc=me@ttaylorr$(echo .)com \
    --cc=phillip.wood@dunelm$(echo .)org.uk \
    --cc=usmanakinyemi202@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox