summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2021-06-30 17:29:59 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-06-30 14:40:10 -0700
commita492d5331cb93d8293e72741b4fb9e1ec4ff294b (patch)
treead292366e125ff2de9be2d2a87afc12828446362 /t
parentt6423: test directory renames causing rename-to-self (diff)
downloadtgif-a492d5331cb93d8293e72741b4fb9e1ec4ff294b.tar.xz
merge-ort: ensure we consult df_conflict and path_conflicts
Path conflicts (typically rename path conflicts, e.g. rename/rename(1to2) or rename/add/delete), and directory/file conflicts should obviously result in files not being marked as clean in the merge. We had a codepath where we missed consulting the path_conflict and df_conflict flags, based on match_mask. Granted, it requires an unusual setup to trigger this codepath (directory rename causing rename-to-self is the only case I can think of), but we still need to handle it. To make it clear that we have audited the other codepaths that do not explicitly mention these flags, add some assertions that the flags are not set. Reported-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t6423-merge-rename-directories.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh
index afb88c347f..316339cb6c 100755
--- a/t/t6423-merge-rename-directories.sh
+++ b/t/t6423-merge-rename-directories.sh
@@ -5000,7 +5000,7 @@ test_setup_12i () {
)
}
-test_expect_merge_algorithm failure failure '12i: Directory rename causes rename-to-self' '
+test_expect_merge_algorithm failure success '12i: Directory rename causes rename-to-self' '
test_setup_12i &&
(
cd 12i &&
@@ -5058,7 +5058,7 @@ test_setup_12j () {
)
}
-test_expect_merge_algorithm failure failure '12j: Directory rename to root causes rename-to-self' '
+test_expect_merge_algorithm failure success '12j: Directory rename to root causes rename-to-self' '
test_setup_12j &&
(
cd 12j &&
@@ -5116,7 +5116,7 @@ test_setup_12k () {
)
}
-test_expect_merge_algorithm failure failure '12k: Directory rename with sibling causes rename-to-self' '
+test_expect_merge_algorithm failure success '12k: Directory rename with sibling causes rename-to-self' '
test_setup_12k &&
(
cd 12k &&