diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-03-31 18:54:35 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-03-31 18:54:35 -0400 |
commit | ddea6cd8a220cb3327b457714a9d52f2b9fe5de5 (patch) | |
tree | fac4d2f16bba1603f3f015a83abe54b02e9d4a38 /Command | |
parent | 906f84620ddeb972a2ab73cbf1a9cd24a8ed2a66 (diff) |
fixed merging of changes from adjusted branch + a remote
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Sync.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 42484e3ba..135f8b42d 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -243,9 +243,7 @@ commitStaged commitmode commitmessage = do return True mergeLocal :: CurrBranch -> CommandStart -mergeLocal currbranch@(Just branch, madj) = do - proptoorig - go =<< needmerge +mergeLocal currbranch@(Just branch, madj) = go =<< needmerge where syncbranch = syncBranch branch needmerge = ifM isBareRepo @@ -260,11 +258,6 @@ mergeLocal currbranch@(Just branch, madj) = do showStart "merge" $ Git.Ref.describe syncbranch next $ next $ merge currbranch Git.Branch.ManualCommit syncbranch branch' = maybe branch (originalToAdjusted branch) madj - -- When in an adjusted branch, propigate any changes made to it - -- back to the original branch. - proptoorig = case madj of - Just adj -> propigateAdjustedCommits branch (adj, branch') - Nothing -> return () mergeLocal (Nothing, _) = stop pushLocal :: CurrBranch -> CommandStart @@ -274,7 +267,13 @@ pushLocal b = do updateSyncBranch :: CurrBranch -> Annex () updateSyncBranch (Nothing, _) = noop -updateSyncBranch (Just branch, _) = do +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 () -- 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 |