aboutsummaryrefslogtreecommitdiff
path: root/t/t3030-merge-recursive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-11-05 12:18:11 -0800
committerJunio C Hamano <gitster@pobox.com>2015-11-05 12:18:11 -0800
commit5e6154fb145d66af36e10ef4db7e1d1e9502c501 (patch)
tree98e62ba6a698d6a4ed266b98e9a95bc5fe1b1c1a /t/t3030-merge-recursive.sh
parentc378862b1ec23dd526e318b4c1bfbf826f8dd6b6 (diff)
parent72fac66bca302dbecbe42dfa0ddc7e42db2fe567 (diff)
downloadgit-5e6154fb145d66af36e10ef4db7e1d1e9502c501.tar.gz
git-5e6154fb145d66af36e10ef4db7e1d1e9502c501.tar.xz
Merge branch 'jk/delete-modechange-conflict' into maint
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 82e18548c..622418763 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