Re: [PATCH v3 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Aug 19, 2026, 22:56 UTC
- Message-ID
- <CALnO6CBmJ3AyaSmHNmOm=aKC5Atp+VWGRTxCpN=ztmvU_xbBMA@mail.gmail.com>
- In-Reply-To
- <xmqq8q62w0gf.fsf@gitster.g>
On Wed, Aug 19, 2026 at 12:15 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
>
> Patrick Steinhardt <ps@pks.im> writes:
>
> >> diff --git a/environment.c b/environment.c
> >> index 6676e6f5ae..c7f6b801f4 100644
> >> --- a/environment.c
> >> +++ b/environment.c
> >> @@ -571,6 +571,13 @@ int git_default_core_config(const char *var, const char *value,
> >> return 0;
> >> }
> >>
> >> +#ifndef NO_NSEC
> >> + if (!strcmp(var, "core.usenanosec")) {
> >> + cfg->use_nanosec = git_config_bool(var, value);
> >> + return 0;
> >> + }
> >> +#endif
> >
> > Do we want to omit a warning in case the config is enabled and we have
> > NO_SEC set? Or would that be too obnoxious?
>
> Those who use a $HOME/.gitconfig shared across two machines with
> different builds would be annoyed with one of them constantly
> complaining, I am afraid.Ah, that reminds me; my shared ~/.gitconfig includes a "site-local" config path, which could then be used to set this option (or not) only where supported.
-- D. Ben Knoble