Skip to content

Commit

Permalink
t6031: move triple-rename test to t3030
Browse files Browse the repository at this point in the history
The t6031 test was introduced to check filemode handling of
merge-recursive. Much later, an unrelated test was tacked on
to look at renames and d/f conflicts. This test does not
depend on anything that happened before (it actually blows
away any existing content in the test repo). Let's move it
to t3030, where there are more related tests.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Oct 26, 2015
1 parent 441c4a4 commit 6f50833
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
30 changes: 30 additions & 0 deletions t/t3030-merge-recursive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 0 additions & 31 deletions t/t6031-merge-recursive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,4 @@ test_expect_success FILEMODE 'verify executable bit on file' '
test -x file2
'

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

0 comments on commit 6f50833

Please sign in to comment.