diff --git a/Git/GCrypt.hs b/Git/GCrypt.hs index 156441daeb..fb99cf6199 100644 --- a/Git/GCrypt.hs +++ b/Git/GCrypt.hs @@ -16,8 +16,11 @@ import qualified Git.Config as Config import qualified Git.Command as Command import Utility.Gpg +urlScheme :: String +urlScheme = "gcrypt:" + urlPrefix :: String -urlPrefix = "gcrypt::" +urlPrefix = urlScheme ++ ":" isEncrypted :: Repo -> Bool isEncrypted Repo { location = Url url } = urlPrefix `isPrefixOf` show url diff --git a/RemoteDaemon/Transport.hs b/RemoteDaemon/Transport.hs index 1bac7f8778..09118ca8b8 100644 --- a/RemoteDaemon/Transport.hs +++ b/RemoteDaemon/Transport.hs @@ -9,6 +9,7 @@ module RemoteDaemon.Transport where import RemoteDaemon.Types import qualified RemoteDaemon.Transport.Ssh +import qualified Git.GCrypt import qualified Data.Map as M @@ -18,4 +19,5 @@ type TransportScheme = String remoteTransports :: M.Map TransportScheme Transport remoteTransports = M.fromList [ ("ssh:", RemoteDaemon.Transport.Ssh.transport) + , (Git.GCrypt.urlScheme, RemoteDaemon.Transport.Ssh.transport) ]