sync: Automatic merge conflict resolution now stages deleted files.

This commit is contained in:
Joey Hess 2013-01-17 21:19:00 -04:00
parent a75946fc6f
commit 49f4ba297c
2 changed files with 7 additions and 1 deletions

View file

@ -223,11 +223,16 @@ resolveMerge = do
top <- fromRepo Git.repoPath
(fs, cleanup) <- inRepo (LsFiles.unmerged [top])
merged <- all id <$> mapM resolveMerge' fs
void $ liftIO cleanup
(deleted, cleanup2) <- inRepo (LsFiles.deleted [top])
Annex.Queue.addCommand "rm" [Params "--quiet -f --"] deleted
void $ liftIO cleanup2
when merged $ do
Annex.Queue.flush
void $ inRepo $ Git.Command.runBool "commit"
[Param "-m", Param "git-annex automatic merge conflict fix"]
void $ liftIO cleanup
return merged
resolveMerge' :: LsFiles.Unmerged -> Annex Bool