aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Sync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-03 13:39:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-03 13:39:07 -0400
commit9bce151df7b073c5f2507ea15ca2237814ae9248 (patch)
tree653751d0c0f70475fc1bd7e89d0465fa76b8c630 /Assistant/Sync.hs
parente4fc1c290dba197a16c0e1cc0ff07ecfe2ee542b (diff)
git subcommand cleanup
Pass subcommand as a regular param, which allows passing git parameters like -c before it. This was already done in the pipeing set of functions, but not the command running set.
Diffstat (limited to 'Assistant/Sync.hs')
-rw-r--r--Assistant/Sync.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs
index 613d03980..8546aa318 100644
--- a/Assistant/Sync.hs
+++ b/Assistant/Sync.hs
@@ -141,13 +141,13 @@ pushToRemotes now notifypushes remotes = do
- uuid in them. While ugly, those branches are reserved for pushing by us,
- and so our pushes will never conflict with other pushes. -}
pushFallback :: UUID -> Git.Ref -> Remote -> Git.Repo -> IO Bool
-pushFallback u branch remote = Git.Command.runBool "push" params
+pushFallback u branch remote = Git.Command.runBool
+ [ Param "push"
+ , Param $ Remote.name remote
+ , Param $ refspec Annex.Branch.name
+ , Param $ refspec branch
+ ]
where
- params =
- [ Param $ Remote.name remote
- , Param $ refspec Annex.Branch.name
- , Param $ refspec branch
- ]
{- Push to refs/synced/uuid/branch; this
- avoids cluttering up the branch display. -}
refspec b = concat
@@ -162,7 +162,7 @@ manualPull :: Maybe Git.Ref -> [Remote] -> Assistant ([Bool], Bool)
manualPull currentbranch remotes = do
g <- liftAnnex gitRepo
results <- liftIO $ forM remotes $ \r ->
- Git.Command.runBool "fetch" [Param $ Remote.name r] g
+ Git.Command.runBool [Param "fetch", Param $ Remote.name r] g
haddiverged <- liftAnnex Annex.Branch.forceUpdate
forM_ remotes $ \r ->
liftAnnex $ Command.Sync.mergeRemote r currentbranch