From 293170d524af06d14f4b8b0ad7c3f092185a3e9b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 17 Jan 2013 21:19:00 -0400 Subject: sync: Automatic merge conflict resolution now stages deleted files. --- Command/Sync.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Command') diff --git a/Command/Sync.hs b/Command/Sync.hs index 61ac3802a..50e709a2d 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -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 -- cgit v1.2.3