git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] meson: wire up USE_NSEC build knob

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 29, 2026, 21:38 UTC
Message-ID
<xmqqmrwdt4cg.fsf@gitster.g>
In-Reply-To
<akIL6oJgUv8J8SB2@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 6 quoted lines
> Hm. That makes me wonder whether it is the completely wrong approach to
> make this a build option then. If it works on some systems and only on
> some filesystems, then a build option is just too coarse-grained. A
> distro wouldn't really be able to ever enable the option, unless it knew
> that repositories will only ever exist on a filesystem that works. Which
> I guess is an assumption that no distro can make.

Yes and no. Build options are not only for distro packagers who aim for widest audience. If you know the target box with its filesystems happen to be OK with the option, flipping the switch to turn it on is totally a sensible thing to do. It is true that this one is much less flexible (because the situation you must be in to enable it is much narrower).

> So instead, I wonder whether we should treat this the same as for
> example "core.ignoreCase", where we only use nanosecond resolution when
> opted in by the user. Ideally, if we had a way to detect brokenness, we
> could even make git-init(1) set it automatically.
I like the line of thought.

The ignoreCase MUST be set for correct operation if your filesystem is incapable of case sensitive operation, and if your filesystem is case sensitive, building with ignoreCase set may limit what you can do, and give you some performace hits, but also the code can make assumptions like "ah, we saw 'Makefile' in this directory so there wouldn't be makefile at the same time" and misbehave). In other words, it is not something you set by choice.

On the other hand, nanosecond timestamp does not have to be enabled even if your filesystem and operating system is capable of keeping the timestamp always down to nanosecond resolution, even though it has to be disabled if your filesystem and operating system randomly loses precision due to buffer cache getting flushed. So there is a slight difference between it and the ignoreCase situation.

Previous: Patrick SteinhardtNext: Jeff King
Message 11 of 19 in “meson: wire up USE_NSEC build knob”
  1. meson: wire up USE_NSEC build knobD. Ben Knoble, Jun 20, 2026
  2. Junio C HamanoJun 21, 2026
  3. D. Ben KnobleJun 21, 2026
  4. Patrick SteinhardtJun 22, 2026
  5. Jeff KingJun 21, 2026
  6. Patrick SteinhardtJun 22, 2026
  7. Jeff KingJun 28, 2026
  8. Jeff KingJun 28, 2026
  9. brian m. carlsonJun 29, 2026
  10. Patrick SteinhardtJun 29, 2026
  11. Junio C HamanoJun 29, 2026
  12. Jeff KingJun 30, 2026
  13. D. Ben KnobleJul 3, 2026
  14. D. Ben KnobleJul 3, 2026
  15. D. Ben KnobleJul 3, 2026
  16. Patrick SteinhardtJul 6, 2026
  17. Jeff KingJul 7, 2026
  18. Junio C HamanoJul 11, 2026
  19. Ben KnobleJul 13, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.