rest of fix for GIT_SSH_COMMAND -n parameter

c8a6be7eef was incomplete
This commit is contained in:
Joey Hess 2017-03-20 23:35:29 -04:00
parent 217cdbe6c8
commit 6af15d0ec9
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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])