From: Ben Knoble <ben.knoble@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Olamide Caleb Bello <belkid98@gmail.com>,
Todd Zullinger <tmz@pobox.com>, Yuchen Tian <cat@malon.dev>
Subject: Re: [PATCH v5 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec
Date: Mon, 31 Aug 2026 20:35:20 -0400 [thread overview]
Message-ID: <B48D3D3E-E5C5-47DE-AD67-C8C6CB11E27C@gmail.com> (raw)
In-Reply-To: <apWUGfzQxx7vArpo@pks.im>
> Le 31 août 2026 à 18:06, Patrick Steinhardt <ps@pks.im> a écrit :
>
> On Mon, Aug 31, 2026 at 08:57:49AM -0400, D. Ben Knoble wrote:
>>> On Mon, Aug 31, 2026 at 5:27 AM Patrick Steinhardt <ps@pks.im> wrote:
>>> On Sun, Aug 30, 2026 at 08:27:13PM -0400, D. Ben Knoble wrote:
>>>> On Sun, Aug 30, 2026 at 5:15 PM Junio C Hamano <gitster@pobox.com> wrote:
> [snip]
>>>> I would happily prove that at least none of our existing tests fail
>>>> with core.useNanosec=true, but I'm not really sure how to shove
>>>> configuration into every test invocation of git. Even if we could, I'm
>>>> not sure we necessarily want to add another CI job for that (though
>>>> that's a separate matter).
>>>>
>>>> In particular, (among others) I have not received any concrete comments
>>> for
>>>>
>>>>> Comments welcome: I haven't touched any tests; I saw a bunch of hits
>>> for
>>>>> "git grep racy t" but wasn't sure how to fit this particular change in,
>>>>> especially since it won't be equally valid on all systems? Advice
>>>>> welcome.
>>>>
>>>> so if there's at least a way to exercise this path on all the tests on
>>>> my system (which should support it), that would probably be a good
>>>> thing.
>>>
>>> Yeah, I simply don't have a good answer here. It's messy, and I'm not a
>>> fan of the current direction of `repo_config_values()` because nobody
>>> has yet stepped up to untangle it from `the_repository`. I gave it a
>>> quick shot at one point in time, but the result was messy at best
>>> because of how we populate it via `repo_config(git_default_config)`.
>>>
>>
>> I took a quick look (being unfamiliar), and yeah, it does seem pretty
>> tangled. I suppose one way to go about it would be to have repo_config()
>> forward the repository argument through configset_iter to the config_fn_t
>> callback? I'm a bit surprised (leaving aside how pervasive the_repository
>> is otherwise) to see it doesn't already do that :)
>>
>> Is that the approach you took? Or, where else did you feel hung up about
>> the resulting code? Just wondering.
>
> Yeah, that's what I did. I don't quite remember what was awkward about
> it though. It might've been that callers have to be aware whether a repo
> is initialized, and whether it has all info to be able to read its own
> configuration? Or I was trying to make it auto-lazy-load or something
> like that, but because our config subsystem is so fragile that led to
> lots of weird edge cases.
>
> Sometimes I really wonder whether that whole caching layer is even worth
> it. We already store the configuration as part of the configset, so
> caching the parsed values probably does not buy us a lot. For some very
> central aspects like the bareness of a repository or the location of the
> worktree it probably even makes sense, but for everything else... I
> dunno. By now I feel like it would make more sense there to find
> localized solutions specific to subsystems instead of having that one
> big global struct that has weird semantics.
Interesting, yeah. I can’t say I’m too motivated to look into this further, personally, but the config system seems fairly complex…
Maybe I’ll take a tour of it one day though, depending on the next itch I scratch ;)
>>> In any case, if we see that your changes interact badly with some edge
>>> cases that we don't currently have on our radar then we can still
>>> refactor the series and move the value into `struct repo_settings`
>>> instead, as that structure works alright with different repositories.
>>
>> This sounds reasonable to me. If nothing else, this series might become
>> good motivation to untangle repo_config_values…
>>
>> Sounds to me like we might be ready for 'next'?
>
> Works for me.
>
> Patrick
Thanks!
next prev parent reply other threads:[~2026-09-01 0:35 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 11:56 [PATCH 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-08-07 11:56 ` [PATCH 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-08-10 12:50 ` Patrick Steinhardt
2026-08-07 11:56 ` [PATCH 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-08-07 11:56 ` [PATCH 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-08-07 21:17 ` Junio C Hamano
2026-08-08 16:31 ` SZEDER Gábor
2026-08-10 12:27 ` D. Ben Knoble
2026-08-10 12:27 ` D. Ben Knoble
2026-08-10 12:44 ` Patrick Steinhardt
2026-08-11 16:26 ` Ben Knoble
2026-08-13 21:40 ` D. Ben Knoble
2026-08-14 11:06 ` Patrick Steinhardt
2026-08-14 11:29 ` Ben Knoble
2026-08-10 12:50 ` Patrick Steinhardt
2026-08-14 12:33 ` [PATCH v2 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-08-14 12:34 ` [PATCH v2 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-08-14 12:34 ` [PATCH v2 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-08-14 12:34 ` [PATCH v2 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-08-14 16:38 ` Junio C Hamano
2026-08-14 19:03 ` D. Ben Knoble
2026-08-18 14:59 ` [PATCH v3 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-08-18 14:59 ` [PATCH v3 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-08-18 14:59 ` [PATCH v3 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-08-18 14:59 ` [PATCH v3 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-08-18 18:51 ` Junio C Hamano
2026-08-19 12:53 ` D. Ben Knoble
2026-08-19 8:24 ` Patrick Steinhardt
2026-08-19 13:09 ` D. Ben Knoble
2026-08-20 5:24 ` Patrick Steinhardt
2026-08-20 11:50 ` D. Ben Knoble
2026-08-19 16:15 ` Junio C Hamano
2026-08-19 22:56 ` D. Ben Knoble
2026-08-20 5:26 ` Patrick Steinhardt
2026-08-20 13:18 ` [PATCH v4 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-08-20 13:18 ` [PATCH v4 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-08-20 13:18 ` [PATCH v4 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-08-20 17:45 ` Junio C Hamano
2026-08-21 12:10 ` D. Ben Knoble
2026-08-20 13:18 ` [PATCH v4 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-08-29 13:38 ` [PATCH v5 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-08-29 13:38 ` [PATCH v5 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-08-29 13:38 ` [PATCH v5 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-08-29 13:38 ` [PATCH v5 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-08-30 21:15 ` Junio C Hamano
2026-08-31 0:27 ` D. Ben Knoble
2026-08-31 9:27 ` Patrick Steinhardt
2026-08-31 13:00 ` D. Ben Knoble
[not found] ` <CALnO6CCNwXC1_PUCTWEU-HXBk+W+sBGqn7Sr8D=ZHW3Mxcu20g@mail.gmail.com>
2026-08-31 14:47 ` Patrick Steinhardt
2026-09-01 0:35 ` Ben Knoble [this message]
2026-08-31 9:27 ` Patrick Steinhardt
2026-08-31 15:46 ` Ben Knoble
2026-08-31 20:01 ` [PATCH v6 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-08-31 20:01 ` [PATCH v6 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-08-31 20:01 ` [PATCH v6 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-08-31 20:01 ` [PATCH v6 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-09-01 4:35 ` Junio C Hamano
2026-09-01 12:38 ` D. Ben Knoble
2026-09-01 17:32 ` Junio C Hamano
2026-09-01 4:54 ` Jeff King
2026-09-01 12:36 ` D. Ben Knoble
2026-09-02 7:26 ` Jeff King
2026-09-02 11:45 ` Ben Knoble
2026-09-02 21:05 ` Junio C Hamano
2026-09-03 1:00 ` Ben Knoble
2026-09-03 15:56 ` Junio C Hamano
2026-09-03 18:16 ` Ben Knoble
2026-08-31 20:06 ` [PATCH v6 0/3] Convert USE_NSEC to runtime config D. Ben Knoble
2026-09-11 12:32 ` [PATCH v7 " D. Ben Knoble
2026-09-11 12:32 ` [PATCH v7 1/3] meson: expose knob for xmlto relative links in manuals D. Ben Knoble
2026-09-11 12:32 ` [PATCH v7 2/3] environment: align repo_config_values_init with struct declaration D. Ben Knoble
2026-09-11 12:32 ` [PATCH v7 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec D. Ben Knoble
2026-09-11 18:35 ` [PATCH v7 0/3] Convert USE_NSEC to runtime config Junio C Hamano
2026-09-11 20:16 ` Ben Knoble
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=B48D3D3E-E5C5-47DE-AD67-C8C6CB11E27C@gmail.com \
--to=ben.knoble@gmail.com \
--cc=belkid98@gmail.com \
--cc=cat@malon.dev \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
--cc=tmz@pobox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox