Skip to content

Commit 5601ba6

Browse files
newrengitster
authored andcommitted
t6031: Add a testcase covering multiple renames across a D/F conflict
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a3e4136 commit 5601ba6

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

t/t6031-merge-recursive.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,35 @@ test_expect_success FILEMODE 'verify executable bit on file' '
5757
test -x file2
5858
'
5959

60+
test_expect_failure 'merging with triple rename across D/F conflict' '
61+
git reset --hard HEAD &&
62+
git checkout -b main &&
63+
git rm -rf . &&
64+
65+
echo "just a file" >sub1 &&
66+
mkdir -p sub2 &&
67+
echo content1 >sub2/file1 &&
68+
echo content2 >sub2/file2 &&
69+
echo content3 >sub2/file3 &&
70+
mkdir simple &&
71+
echo base >simple/bar &&
72+
git add -A &&
73+
test_tick &&
74+
git commit -m base &&
75+
76+
git checkout -b other &&
77+
echo more >>simple/bar &&
78+
test_tick &&
79+
git commit -a -m changesimplefile &&
80+
81+
git checkout main &&
82+
git rm sub1 &&
83+
git mv sub2 sub1 &&
84+
test_tick &&
85+
git commit -m changefiletodir &&
86+
87+
test_tick &&
88+
git merge other
89+
'
90+
6091
test_done

0 commit comments

Comments
 (0)