Allow rsync to use other remote shells.

Introduced a new per-remote option 'annex-rsync-transport' to specify
the remote shell that it to be used with rsync. In case the value is
'ssh', connections are cached unless 'sshcaching' is unset.
This commit is contained in:
guilhem 2013-04-14 00:10:49 +02:00 committed by Joey Hess
parent 4e7df50907
commit a1eded8641
5 changed files with 58 additions and 11 deletions

View file

@ -22,9 +22,10 @@ sshToRepo :: Git.Repo -> [CommandParam] -> Annex [CommandParam]
sshToRepo repo sshcmd = do
g <- fromRepo id
let c = extractRemoteGitConfig g (Git.repoDescribe repo)
let opts = map Param $ remoteAnnexSshOptions c
params <- sshParams (Git.Url.hostuser repo, Git.Url.port repo) opts
return $ params ++ sshcmd
opts = map Param $ remoteAnnexSshOptions c
host = Git.Url.hostuser repo
params <- sshCachingOptions (host, Git.Url.port repo) opts
return $ params ++ Param host : sshcmd
{- Generates parameters to run a git-annex-shell command on a remote
- repository. -}