From ca75ef5d977894295439a033752bfec3ece7f8e8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 30 May 2015 22:01:52 -0400 Subject: sync, remotedaemon: Pass configured ssh-options even when annex.sshcaching is disabled. --- Annex/Ssh.hs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'Annex/Ssh.hs') diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 627c04532..52959ef7b 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -271,20 +271,23 @@ sshOptionsTo remote gc g Just host -> do (msockfile, _) <- sshCachingInfo (host, Git.Url.port remote) case msockfile of - Nothing -> return g + Nothing -> use [] Just sockfile -> do - command <- liftIO programPath prepSocket sockfile - let val = toSshOptionsEnv $ concat - [ sshConnectionCachingParams sockfile - , map Param (remoteAnnexSshOptions gc) - ] - liftIO $ do - g' <- addGitEnv g sshOptionsEnv val - addGitEnv g' "GIT_SSH" command + use (sshConnectionCachingParams sockfile) where uncached = return g + use opts = do + let val = toSshOptionsEnv $ concat + [ opts + , map Param (remoteAnnexSshOptions gc) + ] + command <- liftIO programPath + liftIO $ do + g' <- addGitEnv g sshOptionsEnv val + addGitEnv g' "GIT_SSH" command + runSshOptions :: [String] -> String -> IO () runSshOptions args s = do let args' = toCommand (fromSshOptionsEnv s) ++ args -- cgit v1.2.3