From: Junio C Hamano Date: Fri, 14 Aug 2026 16:38:15 GMT Subject: Re: [PATCH v2 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec Message-ID: In-Reply-To: <2d1424732af6af9c82c775e8256ea914204e8e43.1786710807.git.ben.knoble@gmail.com> "D. Ben Knoble" 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?