Fix parsing of ipv6 address in git remote address when it was not formatted as an url.
This commit is contained in:
parent
03dae17127
commit
11f111bf1a
3 changed files with 18 additions and 1 deletions
|
@ -102,7 +102,13 @@ parseRemoteLocation s repo = ret $ calcloc s
|
|||
&& not ("::" `isInfixOf` v)
|
||||
scptourl v = "ssh://" ++ host ++ slash dir
|
||||
where
|
||||
(host, dir) = separate (== ':') v
|
||||
(host, dir)
|
||||
-- handle ipv6 address inside []
|
||||
| "[" `isPrefixOf` v = case break (== ']') v of
|
||||
(h, ']':':':d) -> (h ++ "]", d)
|
||||
(h, ']':d) -> (h ++ "]", d)
|
||||
(h, d) -> (h, d)
|
||||
| otherwise = separate (== ':') v
|
||||
slash d | d == "" = "/~/" ++ d
|
||||
| "/" `isPrefixOf` d = d
|
||||
| "~" `isPrefixOf` d = '/':d
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -5,6 +5,8 @@ git-annex (5.20140832) UNRELEASED; urgency=medium
|
|||
* init: Automatically detect when a repository was cloned with --shared,
|
||||
and set annex.hardlink=true, as well as marking the repository as
|
||||
untrusted.
|
||||
* Fix parsing of ipv6 address in git remote address when it was not
|
||||
formatted as an url.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 04 Sep 2014 16:17:22 -0400
|
||||
|
||||
|
|
|
@ -18,3 +18,12 @@ local repository version: 5
|
|||
supported repository version: 5
|
||||
upgrade supported from repository versions: 0 1 2 4
|
||||
```
|
||||
|
||||
> [[Fixed|done]] by adding support for ipv6 addresses when git-annex
|
||||
> converts a git remote loction into an url. BTW, the
|
||||
> simple workaround is to give it a valid url from the beginning
|
||||
> `ssh://[fcb8:b10:1cb8:c94:58d0:2522:89f9:c89e]/home/thomas/git/musik"`
|
||||
>
|
||||
> As to any problems using an ipv6 remote once it's set up, I've used them
|
||||
> with no problems.
|
||||
> --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue