* map: Fix buggy handling of remotes that are bare git repositories
accessed via ssh.
+ * map: Avoid looping forever with mutually recursive paths between
+ repositories accessed via ssh.
-- Joey Hess <id@joeyh.name> Tue, 22 Apr 2025 14:33:26 -0400
[ s
, "//"
, auth
- , fromOsPath $
+ , fromOsPath $ simplifyPath $
toOsPath referencepath </> repoPath r
]
in r { location = Url $ fromJust $ parseURIPortable absurl }
Where foo is a remote accessed via ssh, which happens to be on the same host and parent directory
as the repo I ran map in, and itself has a remote named foo that has an url of "../foo.git"
-Changing the remote to be named foox with url "../foox", and
-with the bare remote now at "../foox.git", I started to see some looping too,
-though it didn't loop forever:
-
- map . ok
- map origin (sshing...)
- ok
- map foox (sshing...)
- ok
- map origin (sshing...)
- ok
- map foox (sshing...)
- ok
-
One or both problems are caused by `map` using Git.Construct.fromRemotes
on the git config that is has gotten by sshing to the remote and listing its config.
Git.Construct really is written to operate on local repos, and fromRemotes
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2025-04-22T19:42:40Z"
+ content="""
+Ok, I added path normalization and that fixed the infinite loop that I saw.
+
+I'm not 100% sure that it fixed the loop you saw though. Please test a
+daily build.
+"""]]