summaryrefslogtreecommitdiff
path: root/t/t6036-recursive-corner-cases.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-11-08 04:40:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-08 05:23:53 (GMT)
commitbbafc9c44ae7109f636772350934b3c5d747da44 (patch)
tree6a0fa50543947df42adab3818ce62f90d136ac0a /t/t6036-recursive-corner-cases.sh
parent7f8671656f31f5d1cc9d9748b7dc62b76a428cc5 (diff)
downloadgit-bbafc9c44ae7109f636772350934b3c5d747da44.zip
git-bbafc9c44ae7109f636772350934b3c5d747da44.tar.gz
git-bbafc9c44ae7109f636772350934b3c5d747da44.tar.bz2
merge-recursive: improve handling for rename/rename(2to1) conflicts
This makes the rename/rename(2to1) conflicts use the new handle_file_collision() function. Since that function was based originally on the rename/rename(2to1) handling code, the main differences here are in what was added. In particular: * Instead of storing files at collide_path~HEAD and collide_path~MERGE, the files are two-way merged and recorded at collide_path. * Instead of recording the version of the renamed file that existed on the renamed side in the index (thus ignoring any changes that were made to the file on the side of history without the rename), we do a three-way content merge on the renamed path, then store that at either stage 2 or stage 3. * Note that since the content merge for each rename may have conflicts, and then we have to merge the two renamed files, we can end up with nested conflict markers. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6036-recursive-corner-cases.sh')
-rwxr-xr-xt/t6036-recursive-corner-cases.sh12
1 files changed, 3 insertions, 9 deletions
diff --git a/t/t6036-recursive-corner-cases.sh b/t/t6036-recursive-corner-cases.sh
index d6b7e56..99cddb0 100755
--- a/t/t6036-recursive-corner-cases.sh
+++ b/t/t6036-recursive-corner-cases.sh
@@ -64,15 +64,12 @@ test_expect_success 'merge simple rename+criss-cross with no modifications' '
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
- test_line_count = 3 out &&
+ test_line_count = 1 out &&
git rev-parse >expect \
- L2:three R2:three \
L2:three R2:three &&
git rev-parse >actual \
:2:three :3:three &&
- git hash-object >>actual \
- three~HEAD three~R2^0 &&
test_cmp expect actual
)
'
@@ -140,15 +137,12 @@ test_expect_success 'merge criss-cross + rename merges with basic modification'
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
- test_line_count = 3 out &&
+ test_line_count = 1 out &&
git rev-parse >expect \
- L2:three R2:three \
L2:three R2:three &&
git rev-parse >actual \
:2:three :3:three &&
- git hash-object >>actual \
- three~HEAD three~R2^0 &&
test_cmp expect actual
)
'
@@ -1512,7 +1506,7 @@ test_expect_success 'setup nested conflicts' '
)
'
-test_expect_failure 'check nested conflicts' '
+test_expect_success 'check nested conflicts' '
(
cd nested_conflicts &&