From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Jeff King <peff@peff.net>,
"D. Ben Knoble" <ben.knoble+github@gmail.com>,
git@vger.kernel.org,
"brian m . carlson" <sandals@crustytoothpaste.net>,
Ramsay Jones <ramsay@ramsayjones.plus.com>
Subject: Re: [PATCH] meson: wire up USE_NSEC build knob
Date: Mon, 29 Jun 2026 14:38:07 -0700 [thread overview]
Message-ID: <xmqqmrwdt4cg.fsf@gitster.g> (raw)
In-Reply-To: <akIL6oJgUv8J8SB2@pks.im> (Patrick Steinhardt's message of "Mon, 29 Jun 2026 08:08:42 +0200")
Patrick Steinhardt <ps@pks.im> writes:
> 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.
prev parent reply other threads:[~2026-06-29 21:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 16:00 [PATCH] meson: wire up USE_NSEC build knob D. Ben Knoble
2026-06-21 1:01 ` Junio C Hamano
2026-06-21 16:41 ` D. Ben Knoble
2026-06-22 8:13 ` Patrick Steinhardt
2026-06-21 17:49 ` Jeff King
2026-06-22 8:13 ` Patrick Steinhardt
2026-06-28 8:18 ` Jeff King
2026-06-28 8:48 ` Jeff King
2026-06-29 0:23 ` brian m. carlson
2026-06-29 6:08 ` Patrick Steinhardt
2026-06-29 21: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=xmqqmrwdt4cg.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ben.knoble+github@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=ramsay@ramsayjones.plus.com \
--cc=sandals@crustytoothpaste.net \
/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