summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-09 13:50:23 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-09 13:50:23 -0400
commit07f720ac361207a8a5f5f2005e3c841b7ffdb64b (patch)
treeafdcdde0e893c76050ad504c7c45bab66a460b88
parentd8331995cd692d6b81895114e23dc7b1939fc6d1 (diff)
don't treat foo::bar as a ssh url
It's a git-remote-helper location, and will be stored as just an url.
-rw-r--r--Git/Construct.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs
index 663303c15..e367c096b 100644
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -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