summaryrefslogtreecommitdiff
path: root/Git/Remote.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Remote.hs')
-rw-r--r--Git/Remote.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Git/Remote.hs b/Git/Remote.hs
index dfb6a721c..9d969c416 100644
--- a/Git/Remote.hs
+++ b/Git/Remote.hs
@@ -11,6 +11,7 @@ module Git.Remote where
import Common
import Git
+import Git.Types
import qualified Git.Command
import qualified Git.BuildVersion
@@ -21,8 +22,6 @@ import Network.URI
import Git.FilePath
#endif
-type RemoteName = String
-
{- Construct a legal git remote name out of an arbitrary input string.
-
- There seems to be no formal definition of this in the git source,
@@ -62,6 +61,10 @@ remoteLocationIsUrl :: RemoteLocation -> Bool
remoteLocationIsUrl (RemoteUrl _) = True
remoteLocationIsUrl _ = False
+remoteLocationIsSshUrl :: RemoteLocation -> Bool
+remoteLocationIsSshUrl (RemoteUrl u) = "ssh://" `isPrefixOf` u
+remoteLocationIsSshUrl _ = False
+
{- Determines if a given remote location is an url, or a local
- path. Takes the repository's insteadOf configuration into account. -}
parseRemoteLocation :: String -> Repo -> RemoteLocation