propigate ssh-options everywhere ssh caching is used

* sync: Use the ssh-options git config when doing git pull and push.
* remotedaemon: Use the ssh-options git config.

Note that the rename env var means that if a new git-annex calls an old one
for git-annex ssh, or a new calls an old, nothing much will go wrong;
just ssh caching won't happen.
This commit is contained in:
Joey Hess 2015-02-12 16:12:32 -04:00
parent 3f5c9ddc05
commit 15107d2c5a
8 changed files with 53 additions and 33 deletions

View file

@ -234,8 +234,9 @@ pullRemote remote branch = do
stopUnless fetch $
next $ mergeRemote remote branch
where
fetch = inRepoWithSshCachingTo (Remote.repo remote) $ Git.Command.runBool
[Param "fetch", Param $ Remote.name remote]
fetch = inRepoWithSshOptionsTo (Remote.repo remote) (Remote.gitconfig remote) $
Git.Command.runBool
[Param "fetch", Param $ Remote.name remote]
{- The remote probably has both a master and a synced/master branch.
- Which to merge from? Well, the master has whatever latest changes
@ -270,7 +271,7 @@ pushRemote remote (Just branch) = go =<< needpush
showStart "push" (Remote.name remote)
next $ next $ do
showOutput
ok <- inRepoWithSshCachingTo (Remote.repo remote) $
ok <- inRepoWithSshOptionsTo (Remote.repo remote) (Remote.gitconfig remote) $
pushBranch remote branch
unless ok $ do
warning $ unwords [ "Pushing to " ++ Remote.name remote ++ " failed." ]