repair: Improve fetching from a remote with an url in host:path format.
authorJoey Hess <joeyh@joeyh.name>
Mon, 4 May 2020 19:32:06 +0000 (15:32 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 4 May 2020 19:32:06 +0000 (15:32 -0400)
commitdfc4e641b5c14418ec1c1b45bed1325cf8cbb0c3
treebaef171ab29ac4fb164db42a1768cb127a9f800c
parentd2e78dfc0d809e672b50b3bb1a8a9c2b4fb2cfde
repair: Improve fetching from a remote with an url in host:path format.

User reported git@my.gitlab.foo:username/myrepo.git didn't work with
git-repair, because it rewrites it to an url
ssh://git@my.gitlab.foo/~/username/myrepo.git
and the /~/ was not something the hosting site supported.

Since git-annex still generally needs the repo url to be well, an url, did
not change the conversion code. But in this case, we're running git fetch,
so we might as well pass it the remote name rather than the url.

Did a quick audit of repoLocation uses to see if there was anything else
like this problem elsewhere, and didn't see any. But this is not the first
time this special case in git and git-annex's attempt to de-special-case
it has caused a problem..
CHANGELOG
Git/Repair.hs