Thread (105 messages) 105 messages, 5 authors, 20d ago

Re: [PATCH 9/9] refs: always use absolute paths for reference stores

From: Patrick Steinhardt <hidden>
Date: 2026-06-15 12:36:52

On Fri, Jun 12, 2026 at 02:58:19AM -0700, Karthik Nayak wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
Both the "files" and "reftable" backends use
`refs_compute_filesystem_location()` to figure out the location of both
the git and common directories. Depending on how the function is called
we may or may not return an absolute path.

There isn't really a good reason to use relative paths though. Quite on
the contrary, because we sometimes use relative paths we are forced to
register for chdir(3p) notifications via `chdir_notify_reparent()`.
With the previous changes added, we register via
`chdir_notify_register()`
quoted
Adapt the function to always return absolute paths. This results in a
user-visible change in behaviour where we now unconditionally print
absolute paths in error messages. But arguably, that change in behaviour
is acceptable and may even be good in cases where a Git command may end
up accessing references across multiple different repositories.

Furthermore, drop the calls to `chdir_notify_reparent()`, which aren't
required anymore now that the paths are always absolute.
Same here, should be `chdir_notify_register()`
Yes, will fix.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help