diff options
author | Joey Hess <joey@kitenet.net> | 2013-11-07 18:02:00 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-11-07 18:02:00 -0400 |
commit | cffc5e74129be798801086c612efd099fe7148ac (patch) | |
tree | d9f1849379ded21dcf1b604c1eb76d8fecdf2900 /Git/Remote.hs | |
parent | 38af1ef22c6da0ade33208021f51141eff986e94 (diff) |
webapp: Improve UI around remote that have no annex.uuid set, either because setup of them is incomplete, or because the remote git repository is not a git-annex repository.
Complicated by such repositories potentially being repos that should have
an annex.uuid, but it failed to be gotten, perhaps due to the past ssh repo
setup bugs. This is handled now by an Upgrade Repository button.
Diffstat (limited to 'Git/Remote.hs')
-rw-r--r-- | Git/Remote.hs | 7 |
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 |