From 170d56650b431973296d00fa15eedf988a7838ad Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Mar 2017 23:35:29 -0400 Subject: rest of fix for GIT_SSH_COMMAND -n parameter fbf69ca7b3eee84c2284d260aa70f106ff9d6d57 was incomplete --- Annex/Ssh.hs | 7 +++---- 1 file 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]) -- cgit v1.2.3