summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Bup.hs8
-rw-r--r--Remote/GCrypt.hs4
-rw-r--r--Remote/Helper/Ssh.hs2
-rw-r--r--Remote/Rsync.hs17
4 files changed, 16 insertions, 15 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs
index b3152afcf..0c156345e 100644
--- a/Remote/Bup.hs
+++ b/Remote/Bup.hs
@@ -167,7 +167,7 @@ remove buprepo k = do
| otherwise = void $ liftIO $ catchMaybeIO $ do
r' <- Git.Config.read r
boolSystem "git" $ Git.Command.gitCommandLine params r'
- params = [ Params "branch -q -D", Param (bupRef k) ]
+ params = [ Param "branch", Param "-q", Param "-D", Param (bupRef k) ]
{- Bup does not provide a way to tell if a given dataset is present
- in a bup repository. One way it to check if the git repository has
@@ -182,7 +182,9 @@ checkKey r bupr k
Git.Command.gitCommandLine params bupr
where
params =
- [ Params "show-ref --quiet --verify"
+ [ Param "show-ref"
+ , Param "--quiet"
+ , Param "--verify"
, Param $ "refs/heads/" ++ bupRef k
]
@@ -194,7 +196,7 @@ storeBupUUID u buprepo = do
then do
showAction "storing uuid"
unlessM (onBupRemote r boolSystem "git"
- [Params $ "config annex.uuid " ++ v]) $
+ [Param "config", Param "annex.uuid", Param v]) $
error "ssh failed"
else liftIO $ do
r' <- Git.Config.read r
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs
index fc0c27f37..8a1dcc41a 100644
--- a/Remote/GCrypt.hs
+++ b/Remote/GCrypt.hs
@@ -175,7 +175,7 @@ gCryptSetup mu _ c = go $ M.lookup "gitrepo" c
go (Just gitrepo) = do
(c', _encsetup) <- encryptionSetup c
inRepo $ Git.Command.run
- [ Params "remote add"
+ [ Param "remote", Param "add"
, Param remotename
, Param $ Git.GCrypt.urlPrefix ++ gitrepo
]
@@ -251,7 +251,7 @@ setupRepo gcryptid r
void $ Git.Config.changeFile tmpconfig coreGCryptId gcryptid
void $ Git.Config.changeFile tmpconfig denyNonFastForwards (Git.Config.boolConfig False)
ok <- liftIO $ rsync $ rsynctransport ++
- [ Params "--recursive"
+ [ Param "--recursive"
, Param $ tmp ++ "/"
, Param rsyncurl
]
diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs
index 546e28048..1e4daa1ad 100644
--- a/Remote/Helper/Ssh.hs
+++ b/Remote/Helper/Ssh.hs
@@ -95,7 +95,7 @@ inAnnex r k = do
{- Removes a key from a remote. -}
dropKey :: Git.Repo -> Key -> Annex Bool
dropKey r key = onRemote r (boolSystem, return False) "dropkey"
- [ Params "--quiet --force"
+ [ Param "--quiet", Param "--force"
, Param $ key2file key
]
[]
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 2c8b17884..3986863b3 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -172,10 +172,9 @@ store o k src meterupdate = withRsyncScratchDir $ \tmp -> do
ps <- sendParams
if ok
then showResumable $ rsyncRemote Upload o (Just meterupdate) $ ps ++
- [ Param "--recursive"
- , partialParams
+ Param "--recursive" : partialParams ++
-- tmp/ to send contents of tmp dir
- , File $ addTrailingPathSeparator tmp
+ [ File $ addTrailingPathSeparator tmp
, Param $ rsyncUrl o
]
else return False
@@ -204,9 +203,9 @@ remove o k = do
rsync $ rsyncOptions o ++ ps ++
map (\s -> Param $ "--include=" ++ s) includes ++
[ Param "--exclude=*" -- exclude everything else
- , Params "--quiet --delete --recursive"
- , partialParams
- , Param $ addTrailingPathSeparator dummy
+ , Param "--quiet", Param "--delete", Param "--recursive"
+ ] ++ partialParams ++
+ [ Param $ addTrailingPathSeparator dummy
, Param $ rsyncUrl o
]
where
@@ -237,8 +236,8 @@ checkKey r o k = do
{- Rsync params to enable resumes of sending files safely,
- ensure that files are only moved into place once complete
-}
-partialParams :: CommandParam
-partialParams = Params "--partial --partial-dir=.rsync-partial"
+partialParams :: [CommandParam]
+partialParams = [Param "--partial", Param "--partial-dir=.rsync-partial"]
{- When sending files from crippled filesystems, the permissions can be all
- messed up, and it's better to use the default permissions on the
@@ -290,7 +289,7 @@ rsyncRemote direction o m params = do
oh <- mkOutputHandler
liftIO $ rsyncProgress oh meter ps
where
- ps = opts ++ [Params "--progress"] ++ params
+ ps = opts ++ Param "--progress" : params
opts
| direction == Download = rsyncDownloadOptions o
| otherwise = rsyncUploadOptions o