avoid changing gitdir
authorJoey Hess <joeyh@joeyh.name>
Mon, 14 Jul 2025 17:52:13 +0000 (13:52 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 14 Jul 2025 18:22:27 +0000 (14:22 -0400)
commit9cdcbedf2d9a1db5d9f2e9cb7260dc692f6d5d5f
tree3624cf696def8718bdbe41010619301b3aa34249
parentaddcd389fff52347b9347990eb63aa329f64552e
avoid changing gitdir

This code dates back 10 years to commit
e322826e33ede47a2d9c5f979fd629627bcd709c. But as far as I can tell,
it was never necessary. Notice that the comment added in that
commit doesn't match the code -- it says it adjusts the Repo when
the filesystem doesn't support symlinks, but it actually only adjusts
the Repo when the filesystem *does* support symlinks.

Testing in a submodule after this change, annex symlinks still point to
.git/annex/objects/.

(Note that gitAnnexLink contains a special case for submodules on filesystem
not supporting symlinks. I have verified that special case still works.
Without that special case, the annex links look like eg
"../.git/modules/foo/annex/objects", and with them, they look like
".git/annex/objects"
Annex/Fixup.hs