diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-27 15:03:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-27 15:06:47 -0400 |
commit | 9147ad74931222f05b76102bfea61b1fe177fd32 (patch) | |
tree | f45dd6ff1a64d398d1135939b9c09dd4c5f1e52f | |
parent | 8810e57995f78876d5eb2b5429272d884c5e25c2 (diff) |
commit merge resolution
this is necessary so the sync can continue successfully with its push phase
-rw-r--r-- | Command/Sync.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 759afed82..b146379d1 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -167,11 +167,7 @@ mergeFrom branch = do ok <- inRepo $ Git.Merge.mergeNonInteractive branch if ok then return ok - else do - merged <- resolveMerge - when merged $ - showNote "merge conflict automatically resolved" - return merged + else resolveMerge {- Resolves a conflicted merge. It's important that any conflicts be - resolved in a way that itself avoids later merge conflicts, since @@ -191,7 +187,12 @@ mergeFrom branch = do resolveMerge :: Annex Bool resolveMerge = do top <- fromRepo Git.repoPath - all id <$> (mapM resolveMerge' =<< inRepo (LsFiles.unmerged [top])) + merged <- all id <$> (mapM resolveMerge' =<< inRepo (LsFiles.unmerged [top])) + when merged $ do + Annex.Queue.flush + void $ inRepo $ Git.Command.runBool "commit" + [Param "-m", Param "git-annex automatic merge resolution"] + return merged resolveMerge' :: LsFiles.Unmerged -> Annex Bool resolveMerge' u |