Skip to content

Commit 58138d3

Browse files
committed
Merge branch 'js/default-branch-name-part-2'
Update the tests to drop word 'master' from them. * js/default-branch-name-part-2: t9902: avoid using the branch name `master` tests: avoid variations of the `master` branch name t3200: avoid variations of the `master` branch name fast-export: avoid using unnecessary language in a code comment t/test-terminal: avoid non-inclusive language
2 parents 0cf28f6 + f33f2d3 commit 58138d3

11 files changed

+97
-97
lines changed

builtin/fast-export.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ static void handle_tags_and_duplicates(struct string_list *extras)
10261026
/*
10271027
* Getting here means we have a commit which
10281028
* was excluded by a negative refspec (e.g.
1029-
* fast-export ^master master). If we are
1029+
* fast-export ^HEAD HEAD). If we are
10301030
* referencing excluded commits, set the ref
10311031
* to the exact commit. Otherwise, the user
10321032
* wants the branch exported but every commit

t/t3200-branch.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ test_expect_success 'git branch -M master master should work when master is chec
234234
git branch -M master master
235235
'
236236

237-
test_expect_success 'git branch -M master2 master2 should work when master is checked out' '
237+
test_expect_success 'git branch -M topic topic should work when master is checked out' '
238238
git checkout master &&
239-
git branch master2 &&
240-
git branch -M master2 master2
239+
git branch topic &&
240+
git branch -M topic topic
241241
'
242242

243243
test_expect_success 'git branch -v -d t should work' '
@@ -324,8 +324,8 @@ test_expect_success 'git branch --list -v with --abbrev' '
324324
test_expect_success 'git branch --column' '
325325
COLUMNS=81 git branch --column=column >actual &&
326326
cat >expect <<\EOF &&
327-
a/b/c bam foo l * master mb o/o q
328-
abc bar j/k m/m master2 n o/p r
327+
a/b/c bam foo l * master n o/p r
328+
abc bar j/k m/m mb o/o q topic
329329
EOF
330330
test_cmp expect actual
331331
'
@@ -346,13 +346,13 @@ test_expect_success 'git branch --column with an extremely long branch name' '
346346
l
347347
m/m
348348
* master
349-
master2
350349
mb
351350
n
352351
o/o
353352
o/p
354353
q
355354
r
355+
topic
356356
$long
357357
EOF
358358
test_cmp expect actual
@@ -365,8 +365,8 @@ test_expect_success 'git branch with column.*' '
365365
git config --unset column.branch &&
366366
git config --unset column.ui &&
367367
cat >expect <<\EOF &&
368-
a/b/c bam foo l * master mb o/o q
369-
abc bar j/k m/m master2 n o/p r
368+
a/b/c bam foo l * master n o/p r
369+
abc bar j/k m/m mb o/o q topic
370370
EOF
371371
test_cmp expect actual
372372
'
@@ -377,7 +377,7 @@ test_expect_success 'git branch --column -v should fail' '
377377

378378
test_expect_success 'git branch -v with column.ui ignored' '
379379
git config column.ui column &&
380-
COLUMNS=80 git branch -v | cut -c -10 | sed "s/ *$//" >actual &&
380+
COLUMNS=80 git branch -v | cut -c -9 | sed "s/ *$//" >actual &&
381381
git config --unset column.ui &&
382382
cat >expect <<\EOF &&
383383
a/b/c
@@ -389,13 +389,13 @@ test_expect_success 'git branch -v with column.ui ignored' '
389389
l
390390
m/m
391391
* master
392-
master2
393392
mb
394393
n
395394
o/o
396395
o/p
397396
q
398397
r
398+
topic
399399
EOF
400400
test_cmp expect actual
401401
'
@@ -597,10 +597,10 @@ test_expect_success 'git branch -C master master should work when master is chec
597597
git branch -C master master
598598
'
599599

600-
test_expect_success 'git branch -C master5 master5 should work when master is checked out' '
600+
test_expect_success 'git branch -C main5 main5 should work when master is checked out' '
601601
git checkout master &&
602-
git branch master5 &&
603-
git branch -C master5 master5
602+
git branch main5 &&
603+
git branch -C main5 main5
604604
'
605605

606606
test_expect_success 'git branch -C ab cd should overwrite existing config for cd' '
@@ -711,11 +711,11 @@ test_expect_success 'deleting a self-referential symref' '
711711
'
712712

713713
test_expect_success 'renaming a symref is not allowed' '
714-
git symbolic-ref refs/heads/master2 refs/heads/master &&
715-
test_must_fail git branch -m master2 master3 &&
716-
git symbolic-ref refs/heads/master2 &&
714+
git symbolic-ref refs/heads/topic refs/heads/master &&
715+
test_must_fail git branch -m topic new-topic &&
716+
git symbolic-ref refs/heads/topic &&
717717
test_path_is_file .git/refs/heads/master &&
718-
test_path_is_missing .git/refs/heads/master3
718+
test_path_is_missing .git/refs/heads/new-topic
719719
'
720720

721721
test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '

t/t3427-rebase-subtree.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ commit_message() {
1515
# this test script tries to document them. First, the following commit history
1616
# is generated (the onelines are shown, time flows from left to right):
1717
#
18-
# master1 - master2 - master3
18+
# topic_1 - topic_2 - topic_3
1919
# \
20-
# README ---------------------- Add subproject master - master4 - files_subtree/master5
20+
# README ---------------------- Add subproject master - topic_4 - files_subtree/topic_5
2121
#
2222
# Where the merge moves the files master[123].t into the subdirectory
23-
# files_subtree/ and master4 as well as files_subtree/master5 add files to that
23+
# files_subtree/ and topic_4 as well as files_subtree/topic_5 add files to that
2424
# directory directly.
2525
#
2626
# Then, in subsequent test cases, `git filter-branch` is used to distill just
2727
# the commits that touch files_subtree/. To give it a final pre-rebase touch,
2828
# an empty commit is added on top. The pre-rebase commit history looks like
2929
# this:
3030
#
31-
# Add subproject master - master4 - files_subtree/master5 - Empty commit
31+
# Add subproject master - topic_4 - files_subtree/topic_5 - Empty commit
3232
#
33-
# where the root commit adds three files: master1.t, master2.t and master3.t.
33+
# where the root commit adds three files: topic_1.t, topic_2.t and topic_3.t.
3434
#
35-
# This commit history is then rebased onto `master3` with the
35+
# This commit history is then rebased onto `topic_3` with the
3636
# `-Xsubtree=files_subtree` option in three different ways:
3737
#
3838
# 1. using `--preserve-merges`
@@ -43,9 +43,9 @@ test_expect_success 'setup' '
4343
test_commit README &&
4444
4545
git init files &&
46-
test_commit -C files master1 &&
47-
test_commit -C files master2 &&
48-
test_commit -C files master3 &&
46+
test_commit -C files topic_1 &&
47+
test_commit -C files topic_2 &&
48+
test_commit -C files topic_3 &&
4949
5050
: perform subtree merge into files_subtree/ &&
5151
git fetch files refs/heads/master:refs/heads/files-master &&
@@ -55,8 +55,8 @@ test_expect_success 'setup' '
5555
git commit -m "Add subproject master" &&
5656
5757
: add two extra commits to rebase &&
58-
test_commit -C files_subtree master4 &&
59-
test_commit files_subtree/master5 &&
58+
test_commit -C files_subtree topic_4 &&
59+
test_commit files_subtree/topic_5 &&
6060
6161
git checkout -b to-rebase &&
6262
git fast-export --no-data HEAD -- files_subtree/ |
@@ -66,22 +66,22 @@ test_expect_success 'setup' '
6666
git commit -m "Empty commit" --allow-empty
6767
'
6868

69-
# FAILURE: Does not preserve master4.
69+
# FAILURE: Does not preserve topic_4.
7070
test_expect_failure REBASE_P 'Rebase -Xsubtree --preserve-merges --onto commit' '
7171
reset_rebase &&
7272
git checkout -b rebase-preserve-merges to-rebase &&
7373
git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&
74-
verbose test "$(commit_message HEAD~)" = "master4" &&
75-
verbose test "$(commit_message HEAD)" = "files_subtree/master5"
74+
verbose test "$(commit_message HEAD~)" = "topic_4" &&
75+
verbose test "$(commit_message HEAD)" = "files_subtree/topic_5"
7676
'
7777

78-
# FAILURE: Does not preserve master4.
78+
# FAILURE: Does not preserve topic_4.
7979
test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit' '
8080
reset_rebase &&
8181
git checkout -b rebase-keep-empty to-rebase &&
8282
git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
83-
verbose test "$(commit_message HEAD~2)" = "master4" &&
84-
verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
83+
verbose test "$(commit_message HEAD~2)" = "topic_4" &&
84+
verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" &&
8585
verbose test "$(commit_message HEAD)" = "Empty commit"
8686
'
8787

@@ -91,8 +91,8 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --onto commit' '
9191
test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --onto files-master master &&
9292
: first pick results in no changes &&
9393
git rebase --skip &&
94-
verbose test "$(commit_message HEAD~2)" = "master4" &&
95-
verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
94+
verbose test "$(commit_message HEAD~2)" = "topic_4" &&
95+
verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" &&
9696
verbose test "$(commit_message HEAD)" = "Empty commit"
9797
'
9898

@@ -102,8 +102,8 @@ test_expect_success 'Rebase -Xsubtree --empty=ask --rebase-merges --onto commit'
102102
test_must_fail git rebase -Xsubtree=files_subtree --empty=ask --rebase-merges --onto files-master --root &&
103103
: first pick results in no changes &&
104104
git rebase --skip &&
105-
verbose test "$(commit_message HEAD~2)" = "master4" &&
106-
verbose test "$(commit_message HEAD~)" = "files_subtree/master5" &&
105+
verbose test "$(commit_message HEAD~2)" = "topic_4" &&
106+
verbose test "$(commit_message HEAD~)" = "files_subtree/topic_5" &&
107107
verbose test "$(commit_message HEAD)" = "Empty commit"
108108
'
109109

t/t4150-am.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ test_expect_success 'am changes committer and keeps author' '
465465
test_expect_success 'am --signoff adds Signed-off-by: line' '
466466
rm -fr .git/rebase-apply &&
467467
git reset --hard &&
468-
git checkout -b master2 first &&
468+
git checkout -b topic_2 first &&
469469
git am --signoff <patch2 &&
470470
{
471471
printf "third\n\nSigned-off-by: %s <%s>\n\n" \
@@ -479,7 +479,7 @@ test_expect_success 'am --signoff adds Signed-off-by: line' '
479479
'
480480

481481
test_expect_success 'am stays in branch' '
482-
echo refs/heads/master2 >expected &&
482+
echo refs/heads/topic_2 >expected &&
483483
git symbolic-ref HEAD >actual &&
484484
test_cmp expected actual
485485
'
@@ -540,7 +540,7 @@ test_expect_success 'am without --keep removes Re: and [PATCH] stuff' '
540540
git reset --hard HEAD^ &&
541541
git am <patch4 &&
542542
git rev-parse HEAD >expected &&
543-
git rev-parse master2 >actual &&
543+
git rev-parse topic_2 >actual &&
544544
test_cmp expected actual
545545
'
546546

@@ -567,7 +567,7 @@ test_expect_success 'am --keep-non-patch really keeps the non-patch part' '
567567
test_expect_success 'setup am -3' '
568568
rm -fr .git/rebase-apply &&
569569
git reset --hard &&
570-
git checkout -b base3way master2 &&
570+
git checkout -b base3way topic_2 &&
571571
sed -n -e "3,\$p" msg >file &&
572572
head -n 9 msg >>file &&
573573
git add file &&

t/t5515-fetch-merge-logic.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export GIT_TEST_PROTOCOL_VERSION
1515

1616
build_script () {
1717
script="$1" &&
18-
for i in one three_file master master2 one_tree three two two2 three2
18+
for i in one three_file master topic_2 one_tree three two two2 three2
1919
do
2020
echo "s/$(test_oid --hash=sha1 "$i")/$(test_oid "$i")/g" >>"$script"
2121
done
@@ -52,8 +52,8 @@ test_expect_success setup '
5252
two sha1:525b7fb068d59950d185a8779dc957c77eed73ba
5353
two sha256:3b21de3440cd38c2a9e9b464adb923f7054949ed4c918e1a0ac4c95cd52774db
5454
55-
master2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f
56-
master2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0
55+
topic_2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f
56+
topic_2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0
5757
5858
two2 sha1:6134ee8f857693b96ff1cc98d3e2fd62b199e5a8
5959
two2 sha256:87a2d3ee29c83a3dc7afd41c0606b11f67603120b910a7be7840accdc18344d4

t/t5523-push-upstream.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ test_expect_success 'push -u --dry-run master:otherX' '
4141
check_config master upstream refs/heads/other
4242
'
4343

44-
test_expect_success 'push -u master2:master2' '
45-
git branch master2 &&
46-
git push -u upstream master2:master2 &&
47-
check_config master2 upstream refs/heads/master2
44+
test_expect_success 'push -u topic_2:topic_2' '
45+
git branch topic_2 &&
46+
git push -u upstream topic_2:topic_2 &&
47+
check_config topic_2 upstream refs/heads/topic_2
4848
'
4949

50-
test_expect_success 'push -u master2:other2' '
51-
git push -u upstream master2:other2 &&
52-
check_config master2 upstream refs/heads/other2
50+
test_expect_success 'push -u topic_2:other2' '
51+
git push -u upstream topic_2:other2 &&
52+
check_config topic_2 upstream refs/heads/other2
5353
'
5454

55-
test_expect_success 'push -u :master2' '
56-
git push -u upstream :master2 &&
57-
check_config master2 upstream refs/heads/other2
55+
test_expect_success 'push -u :topic_2' '
56+
git push -u upstream :topic_2 &&
57+
check_config topic_2 upstream refs/heads/other2
5858
'
5959

6060
test_expect_success 'push -u --all' '

t/t6018-rev-list-glob.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ test_expect_success 'setup' '
3232
git checkout -b someref master &&
3333
commit some &&
3434
git checkout master &&
35-
commit master2 &&
35+
commit topic_2 &&
3636
git tag foo/bar master &&
37-
commit master3 &&
37+
commit topic_3 &&
3838
git update-ref refs/remotes/foo/baz master &&
39-
commit master4 &&
39+
commit topic_4 &&
4040
git update-ref refs/remotes/upstream/one subspace/one &&
4141
git update-ref refs/remotes/upstream/two subspace/two &&
4242
git update-ref refs/remotes/upstream/x subspace-x &&

t/t6040-tracking-info.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,25 +264,25 @@ test_expect_success 'fail to track annotated tags' '
264264
test_expect_success '--set-upstream-to does not change branch' '
265265
git branch from-master master &&
266266
git branch --set-upstream-to master from-master &&
267-
git branch from-master2 master &&
268-
test_must_fail git config branch.from-master2.merge > actual &&
269-
git rev-list from-master2 &&
270-
git update-ref refs/heads/from-master2 from-master2^ &&
271-
git rev-parse from-master2 >expect2 &&
272-
git branch --set-upstream-to master from-master2 &&
267+
git branch from-topic_2 master &&
268+
test_must_fail git config branch.from-topic_2.merge > actual &&
269+
git rev-list from-topic_2 &&
270+
git update-ref refs/heads/from-topic_2 from-topic_2^ &&
271+
git rev-parse from-topic_2 >expect2 &&
272+
git branch --set-upstream-to master from-topic_2 &&
273273
git config branch.from-master.merge > actual &&
274-
git rev-parse from-master2 >actual2 &&
274+
git rev-parse from-topic_2 >actual2 &&
275275
grep -q "^refs/heads/master$" actual &&
276276
cmp expect2 actual2
277277
'
278278

279279
test_expect_success '--set-upstream-to @{-1}' '
280280
git checkout follower &&
281-
git checkout from-master2 &&
282-
git config branch.from-master2.merge > expect2 &&
281+
git checkout from-topic_2 &&
282+
git config branch.from-topic_2.merge > expect2 &&
283283
git branch --set-upstream-to @{-1} from-master &&
284284
git config branch.from-master.merge > actual &&
285-
git config branch.from-master2.merge > actual2 &&
285+
git config branch.from-topic_2.merge > actual2 &&
286286
git branch --set-upstream-to follower from-master &&
287287
git config branch.from-master.merge > expect &&
288288
test_cmp expect2 actual2 &&

0 commit comments

Comments
 (0)