Skip to content

Commit 6f50833

Browse files
peffgitster
authored andcommitted
t6031: move triple-rename test to t3030
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 441c4a4 commit 6f50833

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

t/t3030-merge-recursive.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,5 +629,35 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
629629
test_cmp expected actual
630630
'
631631

632+
test_expect_success 'merging with triple rename across D/F conflict' '
633+
git reset --hard HEAD &&
634+
git checkout -b main &&
635+
git rm -rf . &&
636+
637+
echo "just a file" >sub1 &&
638+
mkdir -p sub2 &&
639+
echo content1 >sub2/file1 &&
640+
echo content2 >sub2/file2 &&
641+
echo content3 >sub2/file3 &&
642+
mkdir simple &&
643+
echo base >simple/bar &&
644+
git add -A &&
645+
test_tick &&
646+
git commit -m base &&
647+
648+
git checkout -b other &&
649+
echo more >>simple/bar &&
650+
test_tick &&
651+
git commit -a -m changesimplefile &&
652+
653+
git checkout main &&
654+
git rm sub1 &&
655+
git mv sub2 sub1 &&
656+
test_tick &&
657+
git commit -m changefiletodir &&
658+
659+
test_tick &&
660+
git merge other
661+
'
632662

633663
test_done

t/t6031-merge-recursive.sh

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -53,35 +53,4 @@ test_expect_success FILEMODE 'verify executable bit on file' '
5353
test -x file2
5454
'
5555

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

0 commit comments

Comments
 (0)