summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-31 03:08:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-31 03:08:44 -0400
commitc61642ef0c0203e2e4b698fc7efd6078521a28d0 (patch)
tree91a2906db61defa924a0842cedf0396622b3e4fa
parentaa64b8ceaf9c1566990ce3bab93b913deee64741 (diff)
remove unnecessary check
mergeLocal always creates the local sync branch, so no need to check that it exists later.
-rw-r--r--Command/Sync.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 01c8f22de..cd8ac389d 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -92,13 +92,9 @@ mergeLocal branch = go =<< needmerge
next $ next $ mergeFrom syncbranch
pushLocal :: Git.Ref -> CommandStart
-pushLocal branch = go =<< inRepo (Git.Ref.exists syncbranch)
- where
- syncbranch = syncBranch branch
- go False = stop
- go True = do
- updateBranch syncbranch
- stop
+pushLocal branch = do
+ updateBranch $ syncBranch branch
+ stop
updateBranch :: Git.Ref -> Annex ()
updateBranch syncbranch =