Jeff King [off-list ref] writes:
On Wed, Nov 04, 2026 at 11:25:38AM +0100, Kristofer Karlsson wrote:
quoted
No, I think you are right. The quarantine parent only matters when
the object directory is not under the commondir, which is rare. Your
version is essentially my v1 without the "this is a hack" framing
(and also cleaner).
What we really want is "where are we reading our local refs from" (to
avoid reading them again). So even if you have an object directory not
under the commondir, we would not find our repo again by looking at the
parent of that directory.
But I also won't be surprised if there is some arcane working tree setup
that I'm missing.
With those historic environment variables like GIT_DIR and
GIT_WORK_TREE, and GIT_OBJECT_DIRECTORY, any random arrangement is
possible, I am afraid. I do not know if it is worth worrying about,
though. We've seen people use out-of-tree GIT_DIR by using the
former two environment variables, and I can see why people find it
attractive, but I do not recall people using creative uses of
GIT_OBJECT_DIRECTORY to tear /objects directory out of GIT_DIR, and
what the perceived advantage of doing so are..
Anyway, what's in your v3 looks good to me. Thanks for fixing this!
Thanks, both. Let me mark the topic as ready for 'next'.