diff options
author | Joey Hess <joey@kitenet.net> | 2011-12-31 03:08:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-31 03:08:44 -0400 |
commit | c61642ef0c0203e2e4b698fc7efd6078521a28d0 (patch) | |
tree | 91a2906db61defa924a0842cedf0396622b3e4fa /Command | |
parent | aa64b8ceaf9c1566990ce3bab93b913deee64741 (diff) |
remove unnecessary check
mergeLocal always creates the local sync branch, so no need to check that
it exists later.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Sync.hs | 10 |
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 = |