From 34eb9b2fdc036e1dab4008751e88b312315928d1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Mar 2014 17:45:11 -0400 Subject: sync: Automatically resolve merge conflict between and annexed file and a regular git file. This is a new feature, it was not handled before, since it's a bit of an edge case. However, it can be handled exactly the same as a file/dir conflict, just leave the non-annexed item alone. While implementing this, the core resolveMerge' function got a lot simpler and clearer. Note especially that where before there was an asymetric call to stagefromdirectmergedir, now graftin is called symmetrically in both cases. And, in order to add that `graftin us`, the current branch needed to be known (if there is no current branch, there cannot be a merge conflict). This led to some cleanups of how autoMergeFrom behaved when there is no current branch. This commit was sponsored by Philippe Gauthier. --- Assistant/Threads/Merger.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Assistant/Threads/Merger.hs') diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 74f67aab7..12489b590 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -83,7 +83,7 @@ onChange file [ "merging", Git.fromRef changedbranch , "into", Git.fromRef current ] - void $ liftAnnex $ autoMergeFrom changedbranch + void $ liftAnnex $ autoMergeFrom changedbranch (Just current) mergecurrent _ = noop handleDesynced = case fromTaggedBranch changedbranch of -- cgit v1.2.3