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 | |
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')
-rw-r--r-- | Git/GCrypt.hs | 1 | ||||
-rw-r--r-- | Git/Remote.hs | 7 | ||||
-rw-r--r-- | Git/Types.hs | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/Git/GCrypt.hs b/Git/GCrypt.hs index 0da68bf24..156441dae 100644 --- a/Git/GCrypt.hs +++ b/Git/GCrypt.hs @@ -15,7 +15,6 @@ import Git.Construct import qualified Git.Config as Config import qualified Git.Command as Command import Utility.Gpg -import Git.Remote urlPrefix :: String urlPrefix = "gcrypt::" 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 diff --git a/Git/Types.hs b/Git/Types.hs index 2a33fb27d..e63e93077 100644 --- a/Git/Types.hs +++ b/Git/Types.hs @@ -36,13 +36,15 @@ data Repo = Repo , fullconfig :: M.Map String [String] , remotes :: [Repo] -- remoteName holds the name used for this repo in remotes - , remoteName :: Maybe String + , remoteName :: Maybe RemoteName -- alternate environment to use when running git commands , gitEnv :: Maybe [(String, String)] -- global options to pass to git when running git commands , gitGlobalOpts :: [CommandParam] } deriving (Show, Eq) +type RemoteName = String + {- A git ref. Can be a sha1, or a branch or tag name. -} newtype Ref = Ref String deriving (Eq, Ord) |