From: Junio C Hamano <gitster@pobox.com>
To: Tian Yuchen <cat@malon.dev>
Cc: git@vger.kernel.org, ps@pks.im, newren@gmail.com
Subject: Re: [PATCH v1 0/3] environment: migrate more global variables, pt.2
Date: Sat, 25 Jul 2026 10:02:40 -0700 [thread overview]
Message-ID: <xmqq5x23ypcf.fsf@gitster.g> (raw)
In-Reply-To: <20260725115428.2214202-1-cat@malon.dev> (Tian Yuchen's message of "Sat, 25 Jul 2026 19:54:25 +0800")
Tian Yuchen <cat@malon.dev> writes:
> Hi all,
>
> This series moves:
>
> - (1/3) minimum_abbrev and default_abbrev
> - (2/3) pack_size_limit_cfg
> - (3/3) assume_unchanged
>
> into repo_config_values to continue the libification effort.
>
> Note: in commit 1/3, we need (repo != the_repository) checks in the
> getters, because some subsystems where the readers of _abbrev
> configurations live forbid the use of 'the_repository' and only accept
> 'repo' [1]. We have to explicitly intercept those intances that are
> not 'the_repository'.
Sorry but I am not sure I follow. If a repository that is not
the_repository is not yet allowed, shouldn't the caller be flagged
for passing a random repository that is not the_repository as not
conforming to the API (yet) with:
if (repo != the_repository)
BUG(...);
rather than papering over the issue with an unconditional
repo = the_repository;
override?
If the API that deals with this 'abbrev' setting needs to call
another API that only superficially takes any 'repo' parameter
without supporting anything other than the_repository, isn't that a
sign that the other API needs to be extended to work with any 'repo'
before the 'abbrev' part of the system can use it, simply because the
former is not ready? Futzing with the 'abbrev' part of the system in
such a state piles on more unfinished work that will need to be fixed
later without achieving anything, except for the superficial "now
this part too can take a 'repo' parameter, even though it does not
support anything but the_repository", no?
Puzzled...
prev parent reply other threads:[~2026-07-25 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 11:54 [PATCH v1 0/3] environment: migrate more global variables, pt.2 Tian Yuchen
2026-07-25 11:54 ` [PATCH v1 1/3] environment: migrate minimum_abbrev and default_abbrev Tian Yuchen
2026-07-25 11:54 ` [PATCH v1 2/3] environment: migrate pack_size_limit_cfg into repo_config_values Tian Yuchen
2026-07-25 11:54 ` [PATCH v1 3/3] environment: migrate assume_unchanged " Tian Yuchen
2026-07-25 17:02 ` Junio C Hamano [this message]
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=xmqq5x23ypcf.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=cat@malon.dev \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.