commit merge resolution

this is necessary so the sync can continue successfully with its push phase
This commit is contained in:
Joey Hess 2012-06-27 15:03:13 -04:00
parent 8810e57995
commit 9147ad7493

View file

@ -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