aboutsummaryrefslogtreecommitdiff
path: root/Git/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Ssh.hs')
-rw-r--r--Git/Ssh.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Git/Ssh.hs b/Git/Ssh.hs
index 206e72113..3c9b23905 100644
--- a/Git/Ssh.hs
+++ b/Git/Ssh.hs
@@ -5,10 +5,11 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-module Git.Ssh where
+module Git.Ssh (module Git.Ssh, module Utility.SshHost) where
import Common
import Utility.Env
+import Utility.SshHost
import Data.Char
@@ -21,9 +22,6 @@ gitSshCommandEnv = "GIT_SSH_COMMAND"
gitSshEnvSet :: IO Bool
gitSshEnvSet = anyM (isJust <$$> getEnv) [gitSshEnv, gitSshCommandEnv]
--- Either a hostname, or user@host
-type SshHost = String
-
type SshPort = Integer
-- Command to run on the remote host. It is run by the shell
@@ -59,8 +57,8 @@ gitSsh' host mp cmd extrasshparams = do
-- Git passes exactly these parameters to the ssh command.
gitps = map Param $ case mp of
- Nothing -> [host, cmd]
- Just p -> [host, "-p", show p, cmd]
+ Nothing -> [fromSshHost host, cmd]
+ Just p -> [fromSshHost host, "-p", show p, cmd]
-- Passing any extra parameters to the ssh command may
-- break some commands.