From 9569d6be635e0536daf46d5ebb9fdadc402b93e4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Jun 2016 12:53:35 -0400 Subject: [PATCH] Fix bad automatic merge conflict resolution between an annexed file and a directory with the same name when in an adjusted branch. When running in an overlay work tree, all unchanged files show as deleted, so this code that stages deletions should not run. --- Annex/AutoMerge.hs | 2 +- CHANGELOG | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs index 06efdb7f5c..7f982e515d 100644 --- a/Annex/AutoMerge.hs +++ b/Annex/AutoMerge.hs @@ -121,7 +121,7 @@ resolveMerge us them inoverlay = do let merged = not (null mergedfs') void $ liftIO cleanup - unlessM isDirect $ do + unlessM (pure inoverlay <||> isDirect) $ do (deleted, cleanup2) <- inRepo (LsFiles.deleted [top]) unless (null deleted) $ Annex.Queue.addCommand "rm" diff --git a/CHANGELOG b/CHANGELOG index 2efc4eb242..79f07ba612 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,8 @@ git-annex (6.20160528) UNRELEASED; urgency=medium * list: Do not include dead repositories. * move --to: Better behavior when system is completely out of disk space; drop content from disk before writing location log. + * Fix bad automatic merge conflict resolution between an annexed file + and a directory with the same name when in an adjusted branch. -- Joey Hess Fri, 27 May 2016 13:12:48 -0400