don't treat foo::bar as a ssh url
It's a git-remote-helper location, and will be stored as just an url.
This commit is contained in:
parent
82ccb385e3
commit
444e984727
1 changed files with 4 additions and 1 deletions
|
@ -159,7 +159,10 @@ fromRemoteLocation s repo = gen $ calcloc s
|
|||
(prefix, suffix) = ("url." , ".insteadof")
|
||||
urlstyle v = isURI v || ":" `isInfixOf` v && "//" `isInfixOf` v
|
||||
-- git remotes can be written scp style -- [user@]host:dir
|
||||
scpstyle v = ":" `isInfixOf` v && not ("//" `isInfixOf` v)
|
||||
-- but foo::bar is a git-remote-helper location instead
|
||||
scpstyle v = ":" `isInfixOf` v
|
||||
&& not ("//" `isInfixOf` v)
|
||||
&& not ("::" `isInfixOf` v)
|
||||
scptourl v = "ssh://" ++ host ++ slash dir
|
||||
where
|
||||
(host, dir) = separate (== ':') v
|
||||
|
|
Loading…
Add table
Reference in a new issue