Skip to content

Commit 62564ba

Browse files
committed
Merge branch 'js/default-branch-name-part-3'
Test preparation for the switch of default branch name continues. * js/default-branch-name-part-3: tests: avoid using the branch name `main` t1415: avoid using `main` as ref name
2 parents 20a00ab + 538228e commit 62564ba

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

t/t1415-worktree-refs.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' '
7676
test_cmp expected actual.wt2
7777
'
7878

79-
test_expect_success 'for-each-ref from main repo' '
79+
test_expect_success 'for-each-ref from main worktree' '
8080
mkdir fer1 &&
8181
git -C fer1 init repo &&
8282
test_commit -C fer1/repo initial &&
8383
git -C fer1/repo worktree add ../second &&
84-
git -C fer1/repo update-ref refs/bisect/main HEAD &&
85-
git -C fer1/repo update-ref refs/rewritten/main HEAD &&
86-
git -C fer1/repo update-ref refs/worktree/main HEAD &&
87-
git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&
84+
git -C fer1/repo update-ref refs/bisect/first HEAD &&
85+
git -C fer1/repo update-ref refs/rewritten/first HEAD &&
86+
git -C fer1/repo update-ref refs/worktree/first HEAD &&
87+
git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual &&
8888
cat >expected <<-\EOF &&
89-
refs/bisect/main
90-
refs/rewritten/main
91-
refs/worktree/main
89+
refs/bisect/first
90+
refs/rewritten/first
91+
refs/worktree/first
9292
EOF
9393
test_cmp expected actual
9494
'
9595

96-
test_expect_success 'for-each-ref from linked repo' '
96+
test_expect_success 'for-each-ref from linked worktree' '
9797
mkdir fer2 &&
9898
git -C fer2 init repo &&
9999
test_commit -C fer2/repo initial &&

t/t6012-rev-list-simplify.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
171171
test_expect_success 'rebuild repo' '
172172
rm -rf .git * &&
173173
git init &&
174-
git switch -c main &&
174+
git switch -c topic &&
175175
176176
echo base >file &&
177177
git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' '
186186
git add file &&
187187
test_commit B &&
188188
189-
git switch main &&
189+
git switch topic &&
190190
test_must_fail git merge -m "M" B &&
191191
echo A >file &&
192192
echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' '
207207
git merge -m R -Xtheirs X &&
208208
note R &&
209209
210-
git switch main &&
210+
git switch topic &&
211211
git merge -m N R &&
212212
note N &&
213213
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' '
221221
git add z &&
222222
test_commit Z &&
223223
224-
git switch main &&
224+
git switch topic &&
225225
git merge -m O Z &&
226226
note O &&
227227

t/t6400-merge-df.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,18 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
124124
git add . &&
125125
git commit -m initial &&
126126
127-
git branch main &&
127+
git branch topic &&
128128
git branch other &&
129129
130130
git checkout other &&
131131
echo other >foo/bar-2/baz &&
132132
git add -u &&
133133
git commit -m other &&
134134
135-
git checkout main &&
136-
echo main >foo/bar/baz &&
135+
git checkout topic &&
136+
echo topic >foo/bar/baz &&
137137
git add -u &&
138-
git commit -m main &&
138+
git commit -m topic &&
139139
140140
git merge other &&
141141
git ls-files -s >out &&

t/t6409-merge-subtree.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' '
3535
test_commit foo
3636
'
3737

38-
test_expect_success 'setup branch main' '
39-
git checkout -b main master &&
38+
test_expect_success 'setup topic branch' '
39+
git checkout -b topic master &&
4040
git merge -s ours --no-commit --allow-unrelated-histories sub &&
4141
git read-tree --prefix=dir/ -u sub &&
42-
git commit -m "initial merge of sub into main" &&
42+
git commit -m "initial merge of sub into topic" &&
4343
test_path_is_file dir/foo.t &&
4444
test_path_is_file hello
4545
'
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' '
4949
test_commit bar
5050
'
5151

52-
test_expect_success 'update branch main' '
53-
git checkout main &&
54-
git merge -s subtree sub -m "second merge of sub into main" &&
52+
test_expect_success 'update topic branch' '
53+
git checkout topic &&
54+
git merge -s subtree sub -m "second merge of sub into topic" &&
5555
test_path_is_file dir/bar.t &&
5656
test_path_is_file dir/foo.t &&
5757
test_path_is_file hello

t/t6430-merge-recursive.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
663663

664664
test_expect_success 'merging with triple rename across D/F conflict' '
665665
git reset --hard HEAD &&
666-
git checkout -b main &&
666+
git checkout -b topic &&
667667
git rm -rf . &&
668668
669669
echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' '
682682
test_tick &&
683683
git commit -a -m changesimplefile &&
684684
685-
git checkout main &&
685+
git checkout topic &&
686686
git rm sub1 &&
687687
git mv sub2 sub1 &&
688688
test_tick &&

0 commit comments

Comments
 (0)