merge-recursive: avoid spurious rename/rename conflict from dir renames
commit6e7e027fe5f4a8d61597a86e7f2b6087e23a759c
authorElijah Newren <newren@gmail.com>
Thu, 19 Apr 2018 17:58:15 +0000 (19 10:58 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 May 2018 07:11:00 +0000 (8 16:11 +0900)
tree6b588b3c6e42ded8aad682c31b51dc437da34af9
parentbc71c4eebe7ecbb00e06c6b62bc9f0e42aee9d9b
merge-recursive: avoid spurious rename/rename conflict from dir renames

If a file on one side of history was renamed, and merely modified on the
other side, then applying a directory rename to the modified side gives us
a rename/rename(1to2) conflict.  We should only apply directory renames to
pairs representing either adds or renames.

Making this change means that a directory rename testcase that was
previously reported as a rename/delete conflict will now be reported as a
modify/delete conflict.

Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c
t/t6043-merge-rename-directories.sh