summaryrefslogtreecommitdiff
path: root/t/t6042-merge-rename-corner-cases.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-11-07 20:40:26 -0800
committerJunio C Hamano <gitster@pobox.com>2018-11-08 14:23:53 +0900
commit7f8671656f31f5d1cc9d9748b7dc62b76a428cc5 (patch)
tree89131f74d4a4c5af40818e9f212506bf4c76678f /t/t6042-merge-rename-corner-cases.sh
parent37b65ce36bc8f79b5e8cf6f3addf586bd72f3352 (diff)
downloadgit-7f8671656f31f5d1cc9d9748b7dc62b76a428cc5.tar.gz
merge-recursive: fix rename/add conflict handling
This makes the rename/add conflict handling make use of the new handle_file_collision() function, which fixes several bugs and improves things for the rename/add case significantly. Previously, rename/add would: * Not leave any higher order stage entries in the index, making it appear as if there were no conflict. * Would place the rename file at the colliding path, and move the added file elsewhere, which combined with the lack of higher order stage entries felt really odd. It's not clear to me why the rename should take precedence over the add; if one should be moved out of the way, they both probably should. * In the recursive case, it would do a two way merge of the added file and the version of the renamed file on the renamed side, completely excluding modifications to the renamed file on the unrenamed side of history. Use the new handle_file_collision() to fix all of these issues. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6042-merge-rename-corner-cases.sh')
-rwxr-xr-xt/t6042-merge-rename-corner-cases.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t6042-merge-rename-corner-cases.sh b/t/t6042-merge-rename-corner-cases.sh
index 23c3b6dffa..3e934ae89e 100755
--- a/t/t6042-merge-rename-corner-cases.sh
+++ b/t/t6042-merge-rename-corner-cases.sh
@@ -1095,8 +1095,8 @@ test_conflicts_with_adds_and_renames() {
}
test_conflicts_with_adds_and_renames rename rename failure
-test_conflicts_with_adds_and_renames rename add failure
-test_conflicts_with_adds_and_renames add rename failure
+test_conflicts_with_adds_and_renames rename add success
+test_conflicts_with_adds_and_renames add rename success
test_conflicts_with_adds_and_renames add add success
# Setup: