summaryrefslogtreecommitdiff
path: root/t/t6031-merge-filemode.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6031-merge-filemode.sh')
-rwxr-xr-xt/t6031-merge-filemode.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t6031-merge-filemode.sh b/t/t6031-merge-filemode.sh
index c6896e674c..7d06461f13 100755
--- a/t/t6031-merge-filemode.sh
+++ b/t/t6031-merge-filemode.sh
@@ -74,4 +74,27 @@ do_both_modes () {
do_both_modes recursive
do_both_modes resolve
+test_expect_success 'set up delete/modechange scenario' '
+ git reset --hard &&
+ git checkout -b deletion master &&
+ git rm file1 &&
+ git commit -m deletion
+'
+
+do_delete_modechange () {
+ strategy=$1
+ us=$2
+ them=$3
+ test_expect_success "detect delete/modechange conflict ($strategy, $us)" '
+ git reset --hard &&
+ git checkout $us &&
+ test_must_fail git merge -s $strategy $them
+ '
+}
+
+do_delete_modechange recursive b1 deletion
+do_delete_modechange recursive deletion b1
+do_delete_modechange resolve b1 deletion
+do_delete_modechange resolve deletion b1
+
test_done