aboutsummaryrefslogtreecommitdiff
path: root/Remote/Helper/Ssh.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-01 13:52:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-01 13:58:14 -0400
commit18a3a186e9cdb69ee503d961d8285a341d818c48 (patch)
treed415a97f6c65e2268c948c6c2425d1b94b16df92 /Remote/Helper/Ssh.hs
parentb6e3e7516dfdc054b9e1a281b2e49b392d235ee2 (diff)
type based git config handling for remotes
Still a couple of places that use git config ad-hoc, but this is most of it done.
Diffstat (limited to 'Remote/Helper/Ssh.hs')
-rw-r--r--Remote/Helper/Ssh.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs
index b6da80ec6..135b5c144 100644
--- a/Remote/Helper/Ssh.hs
+++ b/Remote/Helper/Ssh.hs
@@ -10,17 +10,19 @@ module Remote.Helper.Ssh where
import Common.Annex
import qualified Git
import qualified Git.Url
-import Config
import Annex.UUID
import Annex.Ssh
import Fields
+import Types.GitConfig
{- Generates parameters to ssh to a repository's host and run a command.
- Caller is responsible for doing any neccessary shellEscaping of the
- passed command. -}
sshToRepo :: Git.Repo -> [CommandParam] -> Annex [CommandParam]
sshToRepo repo sshcmd = do
- opts <- map Param . words <$> getRemoteConfig repo "ssh-options" ""
+ g <- fromRepo id
+ let c = extractRemoteGitConfig g (Git.repoDescribe repo)
+ let opts = map Param $ remoteAnnexSshOptions c
params <- sshParams (Git.Url.hostuser repo, Git.Url.port repo) opts
return $ params ++ sshcmd