Skip to content

Commit 538228e

Browse files
dschogitster
authored andcommitted
tests: avoid using the branch name main
In the near future, we want to change Git's default branch name to `main`. In preparation for that, stop using it as a branch name in the test suite. Replace that branch name by `topic`, the same name we used to rename variations of `master` in b6211b8 (tests: avoid variations of the `master` branch name, 2020-09-26). Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a15ad5d commit 538228e

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

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)