diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-03-20 23:35:29 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-03-20 23:35:29 -0400 |
commit | 170d56650b431973296d00fa15eedf988a7838ad (patch) | |
tree | d3ee4d7ec79c2c45e8a7a19f1cd334355281a6f4 /Annex | |
parent | 709274840df51297f676c8ee94cf9617f19ce284 (diff) |
rest of fix for GIT_SSH_COMMAND -n parameter
fbf69ca7b3eee84c2284d260aa70f106ff9d6d57 was incomplete
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Ssh.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 4f2b49209..aa357544d 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -54,11 +54,10 @@ data ConsumeStdin = ConsumeStdin | NoConsumeStdin - port. This includes connection caching parameters, and any ssh-options. - If GIT_SSH or GIT_SSH_COMMAND is set, they are used instead. -} sshCommand :: ConsumeStdin -> (SshHost, Maybe SshPort) -> RemoteGitConfig -> SshCommand -> Annex (FilePath, [CommandParam]) -sshCommand cs (host, port) gc remotecmd = - go =<< liftIO (gitSsh host port remotecmd) +sshCommand cs (host, port) gc remotecmd = maybe go return + =<< liftIO (gitSsh' host port remotecmd (consumeStdinParams cs)) where - go (Just (c, ps)) = return (c, consumeStdinParams cs ++ ps) - go Nothing = do + go = do ps <- sshOptions cs (host, port) gc [] return ("ssh", Param host:ps++[Param remotecmd]) |