public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Phillip Wood <phillip.wood123@gmail•com>
Cc: Olamide Caleb Bello <belkid98@gmail•com>,
	 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: Tue, 06 Jan 2026 07:24:36 +0900	[thread overview]
Message-ID: <xmqq1pk3lmu3.fsf@gitster.g> (raw)
In-Reply-To: <a881499d-e236-4f8e-a217-b6bce69e3e3c@gmail.com> (Phillip Wood's message of "Mon, 5 Jan 2026 14:23:26 +0000")

Phillip Wood <phillip.wood123@gmail•com> writes:

> If I run 'git -c core.attributesFile=~does-not-exist rebase -i' with git 
> built from master it fails immediately with "fatal: failed to expand 
> user dir in: '~does-not-exist'".

Hmph, if you call any behaviour change a "regression", this may
certainly count as one, but I do not necessarily think the above is
a good behaviour.

Think about a use case where attributes are not used at all, e.g.,
"git -c core.attributesFile=~does-not-matter cat-file -t HEAD";
would it make sense to barf when your configuration file has an
invalid definition for what you are *not* using?  So if the change
makes it stop barfing, it can even be argued that this is an
improvement.

> It is quite common that moving from parsing config settings eagerly by 
> calling repo_config() at startup to parsing them lazily via 'stuct 
> repo_settings' causes regressions like this. We really should find a way 
> to address that before moving more settings into 'struct repo_settings'

Very true.  If we know the set of things we parse early and have a
way to say "this command only X, Y, and Z matters (but not W)", then
the above cat-file example can omit the attributesFile from the "we
care" set.

I think overusing repo_settings is a disease.  Moving a singleton
global to per repository (by adding to struct repository) is one
thing and it is very welcome.  But changing the way configuration
variables are parsed (e.g., what used to be parsed by only those who
care about is now parsed by everybody, or vice versa) needs to be
handled carefully.

  parent reply	other threads:[~2026-01-05 22:24 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
2026-01-07 15:33                 ` Bello Olamide
2026-01-06  8:09       ` Bello Olamide
2026-01-05 22:24     ` Junio C Hamano [this message]
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=xmqq1pk3lmu3.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=belkid98@gmail$(echo .)com \
    --cc=christian.couder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=kaartic.sivaraam@gmail$(echo .)com \
    --cc=karthik.188@gmail$(echo .)com \
    --cc=me@ttaylorr$(echo .)com \
    --cc=phillip.wood123@gmail$(echo .)com \
    --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