aboutsummaryrefslogtreecommitdiffstats
path: root/t/t3030-merge-recursive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-30 13:06:56 -0700
committerJunio C Hamano <gitster@pobox.com>2015-10-30 13:06:57 -0700
commit203501b39fe89193c252ec651d4bf1fafd784b30 (patch)
tree66fd8be35b5b3b78365a5673c69d9f710fa259ab /t/t3030-merge-recursive.sh
parentf7722a447ab6121f0567cb7f211093983c300a97 (diff)
parent72fac66bca302dbecbe42dfa0ddc7e42db2fe567 (diff)
downloadgit-203501b39fe89193c252ec651d4bf1fafd784b30.tar.gz
Merge branch 'jk/delete-modechange-conflict'
Merging a branch that removes a path and another that changes the mode bits on the same path should have conflicted at the path, but it didn't and silently favoured the removal. * jk/delete-modechange-conflict: merge: detect delete/modechange conflict t6031: generalize for recursive and resolve strategies t6031: move triple-rename test to t3030
Diffstat (limited to 't/t3030-merge-recursive.sh')
-rwxr-xr-xt/t3030-merge-recursive.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index 82e18548c3..6224187632 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -629,5 +629,35 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
test_cmp expected actual
'
+test_expect_success 'merging with triple rename across D/F conflict' '
+ git reset --hard HEAD &&
+ git checkout -b main &&
+ git rm -rf . &&
+
+ echo "just a file" >sub1 &&
+ mkdir -p sub2 &&
+ echo content1 >sub2/file1 &&
+ echo content2 >sub2/file2 &&
+ echo content3 >sub2/file3 &&
+ mkdir simple &&
+ echo base >simple/bar &&
+ git add -A &&
+ test_tick &&
+ git commit -m base &&
+
+ git checkout -b other &&
+ echo more >>simple/bar &&
+ test_tick &&
+ git commit -a -m changesimplefile &&
+
+ git checkout main &&
+ git rm sub1 &&
+ git mv sub2 sub1 &&
+ test_tick &&
+ git commit -m changefiletodir &&
+
+ test_tick &&
+ git merge other
+'
test_done