@matheusbsbs / matheus-bagliano / commits / 538228ed23
Fork 0

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 b6211b89eb3 (tests: avoid variations of the `master` branch name, 2020-09-26). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Oct 8, 2020 at 10:13 UTC 538228ed23a1d5e17e89bb17086d4dda51325bd8
4 files changed +16 -16
t/t6012-rev-list-simplify.sh
+4 -4
@@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
171 test_expect_success 'rebuild repo' '
172 rm -rf .git * &&
173 git init &&
174 - git switch -c main &&
174 + git switch -c topic &&
175
176 echo base >file &&
177 git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' '
186 git add file &&
187 test_commit B &&
188
189 - git switch main &&
189 + git switch topic &&
190 test_must_fail git merge -m "M" B &&
191 echo A >file &&
192 echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' '
207 git merge -m R -Xtheirs X &&
208 note R &&
209
210 - git switch main &&
210 + git switch topic &&
211 git merge -m N R &&
212 note N &&
213
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' '
221 git add z &&
222 test_commit Z &&
223
224 - git switch main &&
224 + git switch topic &&
225 git merge -m O Z &&
226 note O &&
227
t/t6400-merge-df.sh
+4 -4
@@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
124 git add . &&
125 git commit -m initial &&
126
127 - git branch main &&
127 + git branch topic &&
128 git branch other &&
129
130 git checkout other &&
@@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' '
132 git add -u &&
133 git commit -m other &&
134
135 - git checkout main &&
136 - echo main >foo/bar/baz &&
135 + git checkout topic &&
136 + echo topic >foo/bar/baz &&
137 git add -u &&
138 - git commit -m main &&
138 + git commit -m topic &&
139
140 git merge other &&
141 git ls-files -s >out &&
t/t6409-merge-subtree.sh
+6 -6
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' '
35 test_commit foo
36 '
37
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 &&
40 git merge -s ours --no-commit --allow-unrelated-histories sub &&
41 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" &&
43 test_path_is_file dir/foo.t &&
44 test_path_is_file hello
45 '
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' '
49 test_commit bar
50 '
51
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" &&
55 test_path_is_file dir/bar.t &&
56 test_path_is_file dir/foo.t &&
57 test_path_is_file hello
t/t6430-merge-recursive.sh
+2 -2
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' '
663
664 test_expect_success 'merging with triple rename across D/F conflict' '
665 git reset --hard HEAD &&
666 - git checkout -b main &&
666 + git checkout -b topic &&
667 git rm -rf . &&
668
669 echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' '
682 test_tick &&
683 git commit -a -m changesimplefile &&
684
685 - git checkout main &&
685 + git checkout topic &&
686 git rm sub1 &&
687 git mv sub2 sub1 &&
688 test_tick &&