From: Elijah Newren Date: Fri, 12 Aug 2011 05:20:11 +0000 (-0600) Subject: merge-recursive: Fix modify/delete resolution in the recursive case X-Git-Tag: v1.7.7-rc1~28^2~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ec61d14963470b02db0d6e3825e2b5bbb1815cb6?ds=sidebyside;hp=ec61d14963470b02db0d6e3825e2b5bbb1815cb6 merge-recursive: Fix modify/delete resolution in the recursive case When o->call_depth>0 and we have conflicts, we try to find "middle ground" when creating the virtual merge base. In the case of content conflicts, this can be done by doing a three-way content merge and using the result. In all parts where the three-way content merge is clean, it is the correct middle ground, and in parts where it conflicts there is no middle ground but the conflict markers provide a good compromise since they are unlikely to accidentally match any further changes. In the case of a modify/delete conflict, we cannot do the same thing. Accepting either endpoint as the resolution for the virtual merge base runs the risk that when handling the non-recursive case we will silently accept one person's resolution over another without flagging a conflict. In this case, the closest "middle ground" we have is actually the merge base of the candidate merge bases. (We could alternatively attempt a three way content merge using an empty file in place of the deleted file, but that seems to be more work than necessary.) Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano ---