aboutsummaryrefslogtreecommitdiff
path: root/Git/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Ssh.hs')
-rw-r--r--Git/Ssh.hs16
1 files changed, 5 insertions, 11 deletions
diff --git a/Git/Ssh.hs b/Git/Ssh.hs
index b5d90d7a2..79065f2b4 100644
--- a/Git/Ssh.hs
+++ b/Git/Ssh.hs
@@ -47,22 +47,16 @@ gitSsh host mp cmd = do
, Param c
]
, gitps
- -- cmd is already shell escaped
- -- for the remote side, but needs to be
- -- shell-escaped once more since it's
- -- passed through the local shell.
- , [ Param $ shellEscape $ cmd ]
]
- | otherwise -> ret c [ gitps, [Param cmd]]
+ | otherwise -> ret c [gitps]
Nothing -> do
gs <- getEnv gitSshEnv
case gs of
- Just c -> ret c [ gitps, [Param cmd]]
+ Just c -> ret c [gitps]
Nothing -> return Nothing
where
- -- git passes exactly these parameters, followed by another
- -- parameter containing the remote command.
+ -- git passes exactly these parameters
gitps = map Param $ case mp of
- Nothing -> [host]
- Just p -> [host, "-p", show p]
+ Nothing -> [host, cmd]
+ Just p -> [host, "-p", show p, cmd]
ret c ll = return $ Just (c, concat ll)