assistant: Pass ssh-options through 3 more git pull/push calls that were missed before.

It was used for regular pull, but not for regular push, tagged push, or the
fallback fetching.
This commit is contained in:
Joey Hess 2015-11-10 16:52:30 -04:00
parent 4cc95f3fd3
commit 7c741302cc
Failed to extract signature
5 changed files with 34 additions and 12 deletions

View file

@ -263,9 +263,10 @@ inRepoWithSshOptionsTo remote gc a =
{- To make any git commands be run with ssh caching enabled,
- and configured ssh-options alters the local Git.Repo's gitEnv
- to set GIT_SSH=git-annex, and sets sshOptionsEnv. -}
- to set GIT_SSH=git-annex, and set sshOptionsEnv when running git
- commands. -}
sshOptionsTo :: Git.Repo -> RemoteGitConfig -> Git.Repo -> Annex Git.Repo
sshOptionsTo remote gc g
sshOptionsTo remote gc localr
| not (Git.repoIsUrl remote) || Git.repoIsHttp remote = unchanged
| otherwise = case Git.Url.hostuser remote of
Nothing -> unchanged
@ -277,7 +278,7 @@ sshOptionsTo remote gc g
prepSocket sockfile
use (sshConnectionCachingParams sockfile)
where
unchanged = return g
unchanged = return localr
use opts = do
let sshopts = concat
@ -289,9 +290,9 @@ sshOptionsTo remote gc g
else do
command <- liftIO programPath
liftIO $ do
g' <- addGitEnv g sshOptionsEnv
localr' <- addGitEnv localr sshOptionsEnv
(toSshOptionsEnv sshopts)
addGitEnv g' "GIT_SSH" command
addGitEnv localr' "GIT_SSH" command
runSshOptions :: [String] -> String -> IO ()
runSshOptions args s = do