commit merge resolution
this is necessary so the sync can continue successfully with its push phase
This commit is contained in:
parent
8810e57995
commit
9147ad7493
1 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue