Re: [PATCH 3/3] core: convert build-time USE_NSEC into runtime core.useNanosec
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Aug 8, 2026, 16:31 UTC
- Message-ID
- <andZ2eIe6RXifor4@szeder.dev>
- In-Reply-To
- <xmqqv79ld40c.fsf@gitster.g>
On Fri, Aug 07, 2026 at 02:17:39PM -0700, Junio C Hamano wrote:
Show 23 quoted lines
> "D. Ben Knoble" <ben.knoble@gmail.com> writes: > > > Racy Git problems persist today, manifesting themselves in the > > performance of commands like "git diff" in new worktrees [1]. We have > > long had a build knob "USE_NSEC" to tell Git to use in-core nanosecond > > precision when available, which mitigates most if not all racy issues, > > but most builds we know about it don't use it. In part, that's because > > someone distributing Git can't safely enable it at compile-time if they > > don't know exactly what platforms their distribution will be used on. > > > > [1]: https://lore.kernel.org/git/CALnO6CADMJSixqYvL1Yo8qKX5rWhKQ+2OoSEuPUh-yoeK9TseQ@mail.gmail.com > > > > These days, most platforms are likely to be safe for the USE_NSEC code. > > Regardless, we want to give users the ability to benefit from it. This > > requires exposing the compile-time gated code as a runtime option. > > > > In addition, update the Racy Git documentation and other mentions of > > USE_NSEC in the code. > > > > Best-viewed-with: --ignore-space-change > > Don't do this. It probably is helpful to have something like that > below the three-dash lines, though.
Including this hint in the commit message could be useful for anyone who stumbles upon this commit in a couple of months or years time. Whether it should be a trailer or not is another question.