Skip to content

Commit

Permalink
t6031: Add a testcase covering multiple renames across a D/F conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Elijah Newren authored and Junio C Hamano committed Aug 18, 2010
1 parent a3e4136 commit 5601ba6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions t/t6031-merge-recursive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,35 @@ test_expect_success FILEMODE 'verify executable bit on file' '
test -x file2
'

test_expect_failure '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

0 comments on commit 5601ba6

Please sign in to comment.