diff options
author | Joey Hess <joey@kitenet.net> | 2014-07-11 16:56:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-07-11 16:56:19 -0400 |
commit | 88a52a5c74e5035c33533c65819d284eb9d3ac5e (patch) | |
tree | d50627fb021c88efcb5a2908744798b1e0858eac /Annex/AutoMerge.hs | |
parent | 2a727e8c5f8d003af7102ea7de22e45a5faec421 (diff) |
Deal with change in git 2.0 that made indirect mode merge conflict resolution leave behind old files.
I think this is a git behavior change, but have not checked to be sure.
Conflict cruft used to look like $foo~HEAD, but now just $foo is left
behind as conflict cruft.
With test case.
Diffstat (limited to 'Annex/AutoMerge.hs')
-rw-r--r-- | Annex/AutoMerge.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs index 6695c6d38..660d79f63 100644 --- a/Annex/AutoMerge.hs +++ b/Annex/AutoMerge.hs @@ -177,7 +177,7 @@ resolveMerge' (Just us) them u = do return (Just file) {- git-merge moves conflicting files away to files - - named something like f~HEAD or f~branch, but the + - named something like f~HEAD or f~branch or just f, but the - exact name chosen can vary. Once the conflict is resolved, - this cruft can be deleted. To avoid deleting legitimate - files that look like this, only delete files that are @@ -194,7 +194,7 @@ cleanConflictCruft resolvedfs top = do liftIO $ nukeFile f | otherwise = noop s = S.fromList resolvedfs - matchesresolved f = S.member (base f) s + matchesresolved f = S.member f s || S.member (base f) s base f = reverse $ drop 1 $ dropWhile (/= '~') $ reverse f commitResolvedMerge :: Git.Branch.CommitMode -> Annex Bool |