summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-17 17:06:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-17 17:28:25 -0400
commit3930d7a048fbd25fb7d058a08786d532e69927c2 (patch)
tree729a0481536e8acc25bfc5adf7a829163d3fba57
parent3286bebf998700d79ab766472cebfcc4399c8894 (diff)
fix over-shell-escape
Seems I had one time too many.
-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)