summaryrefslogtreecommitdiff
path: root/Remote/Helper/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Helper/Ssh.hs')
-rw-r--r--Remote/Helper/Ssh.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs
index 964c8355a..8de88953f 100644
--- a/Remote/Helper/Ssh.hs
+++ b/Remote/Helper/Ssh.hs
@@ -122,7 +122,7 @@ rsyncParamsRemote direct r direction key file afile = do
fields
-- Convert the ssh command into rsync command line.
let eparam = rsyncShell (Param shellcmd:shellparams)
- let o = rsyncParams r
+ let o = rsyncParams r direction
return $ if direction == Download
then o ++ rsyncopts eparam dummy (File file)
else o ++ rsyncopts eparam (File file) dummy
@@ -140,7 +140,11 @@ rsyncParamsRemote direct r direction key file afile = do
dummy = Param "dummy:"
-- --inplace to resume partial files
-rsyncParams :: Remote -> [CommandParam]
-rsyncParams r = Params "--progress --inplace" :
- map Param (remoteAnnexRsyncOptions $ gitconfig r)
-
+rsyncParams :: Remote -> Direction -> [CommandParam]
+rsyncParams r direction = Params "--progress --inplace" :
+ map Param (remoteAnnexRsyncOptions gc ++ dps)
+ where
+ dps
+ | direction == Download = remoteAnnexRsyncDownloadOptions gc
+ | otherwise = remoteAnnexRsyncUploadOptions gc
+ gc = gitconfig r