summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-04-09 15:10:26 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-04-09 15:10:26 -0400
commit02625cd3767d9fd5be07f1198b763fcb2b63da5d (patch)
tree5ea1cf03951cc70d3863f1c93c3a3d3fff9764ec /Command/Sync.hs
parent618caf2765803eb50ebae67b2e04a3f6055ce883 (diff)
add AdjBranch newtype; some simplications
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r--Command/Sync.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 69f39bb8a..5ec2f8bb3 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -258,7 +258,7 @@ mergeLocal currbranch@(Just branch, madj) = go =<< needmerge
go True = do
showStart "merge" $ Git.Ref.describe syncbranch
next $ next $ merge currbranch Git.Branch.ManualCommit syncbranch
- branch' = maybe branch (originalToAdjusted branch) madj
+ branch' = maybe branch (adjBranch . originalToAdjusted branch) madj
mergeLocal (Nothing, _) = stop
pushLocal :: CurrBranch -> CommandStart
@@ -271,10 +271,7 @@ updateSyncBranch (Nothing, _) = noop
updateSyncBranch (Just branch, madj) = do
-- When in an adjusted branch, propigate any changes made to it
-- back to the original branch.
- case madj of
- Just adj -> propigateAdjustedCommits branch
- (adj, originalToAdjusted branch adj)
- Nothing -> return ()
+ maybe noop (propigateAdjustedCommits branch) madj
-- Update the sync branch to match the new state of the branch
inRepo $ updateBranch (syncBranch branch) branch
-- In direct mode, we're operating on some special direct mode