From c61642ef0c0203e2e4b698fc7efd6078521a28d0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 Dec 2011 03:08:41 -0400 Subject: [PATCH] remove unnecessary check mergeLocal always creates the local sync branch, so no need to check that it exists later. --- Command/Sync.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Command/Sync.hs b/Command/Sync.hs index 01c8f22dee..cd8ac389dd 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 =