From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: git@vger.kernel.org, Todd Zullinger <tmz@pobox.com>,
Tian Yuchen <cat@malon.dev>,
Olamide Caleb Bello <belkid98@gmail.com>,
Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v2 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec
Date: Fri, 14 Aug 2026 09:38:15 -0700 [thread overview]
Message-ID: <xmqqzeyoodxk.fsf@gitster.g> (raw)
In-Reply-To: <2d1424732af6af9c82c775e8256ea914204e8e43.1786710807.git.ben.knoble@gmail.com> (D. Ben Knoble's message of "Fri, 14 Aug 2026 08:34:02 -0400")
"D. Ben Knoble" <ben.knoble@gmail.com> writes:
> -#ifdef USE_NSEC
> - if (cfg->check_stat && sd->sd_mtime.nsec != ST_MTIME_NSEC(*st))
> - changed |= MTIME_CHANGED;
> - if (cfg->trust_ctime && cfg->check_stat &&
> - sd->sd_ctime.nsec != ST_CTIME_NSEC(*st))
> - changed |= CTIME_CHANGED;
> -#endif
> + if (cfg->use_nanosec) {
> + if (cfg->check_stat && sd->sd_mtime.nsec != ST_MTIME_NSEC(*st))
> + changed |= MTIME_CHANGED;
> + if (cfg->trust_ctime && cfg->check_stat &&
> + sd->sd_ctime.nsec != ST_CTIME_NSEC(*st))
> + changed |= CTIME_CHANGED;
> + }
>
> if (cfg->check_stat) {
> if (sd->sd_uid != (unsigned int) st->st_uid ||
This is iffy.
If you have core.usenanosec=true in a networked $HOME/.gitconfig
mounted on both USE_NSEC-capable and incapable platforms, what would
ST_CTIME_NSEC() yield on the latter? I wonder if cfg's
'.use_nanosec' should be force-disabled in NO_NSEC builds, or
something similar?
prev parent reply other threads:[~2026-08-14 16:38 UTC|newest]
Thread overview: 20+ 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 [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=xmqqzeyoodxk.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=belkid98@gmail.com \
--cc=ben.knoble@gmail.com \
--cc=cat@malon.dev \
--cc=git@vger.kernel.org \
--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