Re: [PATCH 0/9] refs: stop using `chdir_notify_reparent()`
- From
Jeff King <peff@peff.net>
- Date
- Jun 11, 2026, 06:53 UTC
- Message-ID
- <20260611065346.GD2191159@coredump.intra.peff.net>
- In-Reply-To
- <20260610-b4-pks-refs-avoid-chdir-notify-reparent-v1-0-56c864b01c43@pks.im>
On Wed, Jun 10, 2026 at 04:57:06PM +0200, Patrick Steinhardt wrote:
> this patch series is a follow-up of the discussion at [1]. It converts > the reference backends to always use absolute paths internally, which > then allows us to drop the calls to `chdir_notify_reparent()`.
We added chdir-notify to suport set_work_tree(). Commit 8500e0de3f (set_work_tree: use chdir_notify, 2018-03-30) mentions an optimization from 044bbbcb63 (Make git_dir a path relative to work_tree in setup_work_tree(), 2008-06-19). That commit demonstrates some measurable speedup from using relative versus absolute paths.
If we move to a world of all absolute paths where chdir-notify is not necessary, will we lose that optimization?
I'm not sure how much it matters in practice these days, or if those timings could be repeated. And they weren't all _that_ big to start with. I guess it may depend on how deep your repo is within your filesystem, too.
-Peff