Support git remotes that use a IPV6 link-local address with a zone ID
Fixed 3 problems, and it seems to work now for both forms: ssh://[fe80::7697:xxx:xxxx:xxxx%wlp3s0]/foo fe80::7697:xxx:xxxx:xxxx%wlp3s0:foo
This commit is contained in:
parent
cb4cdaab75
commit
ff520b06ac
5 changed files with 20 additions and 6 deletions
|
@ -103,9 +103,10 @@ parseRemoteLocation s knownurl repo = go
|
|||
urlstyle v = isURI (escapeURIString isUnescapedInURI v)
|
||||
-- git remotes can be written scp style -- [user@]host:dir
|
||||
-- but foo::bar is a git-remote-helper location instead
|
||||
-- (although '::' can also be part of an IPV6 address)
|
||||
scpstyle v = ":" `isInfixOf` v
|
||||
&& not ("//" `isInfixOf` v)
|
||||
&& not ("::" `isInfixOf` v)
|
||||
&& not ("::" `isInfixOf` (takeWhile (/= '[') v))
|
||||
scptourl v = "ssh://" ++ host ++ slash dir
|
||||
where
|
||||
(host, dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue