Skip to content

Commit 877176e

Browse files
phillipwoodgitster
authored andcommitted
t4013: switch default branch name to main
Remove one of the last remaining uses of "TEST_GIT_DEFAULT_INITIAL_BRANCH= main" in the test suite. We have been steadily be converting tests from using "master" as the default branch name since the introduction of TEST_GIT_DEFAULT_INITIAL_BRANCH in 704fed9 (tests: start moving to a different default main branch name, 2020-10-23) The changes here are purely mechanical replacing "master" with "main" Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 67d9b39 commit 877176e

File tree

97 files changed

+213
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+213
-213
lines changed

t/t4013-diff-various.sh

Lines changed: 110 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
test_description='Various diff formatting options'
77

8-
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
8+
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
99
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
1010

1111
. ./test-lib.sh
@@ -70,7 +70,7 @@ test_expect_success setup '
7070
GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" &&
7171
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
7272
73-
git checkout master &&
73+
git checkout main &&
7474
git pull -s ours --no-rebase . side &&
7575
7676
GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" &&
@@ -95,15 +95,15 @@ test_expect_success setup '
9595
test_write_lines B A >dir/sub &&
9696
git add dir/sub &&
9797
git commit -m "Rearranged lines in dir/sub" &&
98-
git checkout master &&
98+
git checkout main &&
9999
100100
GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
101101
GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
102102
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
103103
git checkout -b mode initial &&
104104
git update-index --chmod=+x file0 &&
105105
git commit -m "update mode" &&
106-
git checkout -f master &&
106+
git checkout -f main &&
107107
108108
GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
109109
GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
@@ -112,12 +112,12 @@ test_expect_success setup '
112112
git update-index --chmod=+x file2 &&
113113
git commit -m "update mode (file2)" &&
114114
git notes add -m "note" &&
115-
git checkout -f master &&
115+
git checkout -f main &&
116116
117-
# Same merge as master, but with parents reversed. Hide it in a
117+
# Same merge as main, but with parents reversed. Hide it in a
118118
# pseudo-ref to avoid impacting tests with --all.
119119
commit=$(echo reverse |
120-
git commit-tree -p master^2 -p master^1 master^{tree}) &&
120+
git commit-tree -p main^2 -p main^1 main^{tree}) &&
121121
git update-ref REVERSE $commit &&
122122
123123
git config diff.renames false &&
@@ -127,15 +127,15 @@ test_expect_success setup '
127127

128128
: <<\EOF
129129
! [initial] Initial
130-
* [master] Merge branch 'side'
130+
* [main] Merge branch 'side'
131131
! [rearrange] Rearranged lines in dir/sub
132132
! [side] Side
133133
----
134134
+ [rearrange] Rearranged lines in dir/sub
135-
- [master] Merge branch 'side'
135+
- [main] Merge branch 'side'
136136
* + [side] Side
137-
* [master^] Third
138-
* [master~2] Second
137+
* [main^] Third
138+
* [main~2] Second
139139
+*++ [initial] Initial
140140
EOF
141141

@@ -311,64 +311,64 @@ diff-tree initial mode
311311
diff-tree --stat initial mode
312312
diff-tree --summary initial mode
313313
314-
diff-tree master
315-
diff-tree -m master
316-
diff-tree -p master
317-
diff-tree -p -m master
318-
diff-tree -c master
319-
diff-tree -c --abbrev master
320-
:noellipses diff-tree -c --abbrev master
321-
diff-tree --cc master
314+
diff-tree main
315+
diff-tree -m main
316+
diff-tree -p main
317+
diff-tree -p -m main
318+
diff-tree -c main
319+
diff-tree -c --abbrev main
320+
:noellipses diff-tree -c --abbrev main
321+
diff-tree --cc main
322322
# stat only should show the diffstat with the first parent
323-
diff-tree -c --stat master
324-
diff-tree --cc --stat master
325-
diff-tree -c --stat --summary master
326-
diff-tree --cc --stat --summary master
323+
diff-tree -c --stat main
324+
diff-tree --cc --stat main
325+
diff-tree -c --stat --summary main
326+
diff-tree --cc --stat --summary main
327327
# stat summary should show the diffstat and summary with the first parent
328328
diff-tree -c --stat --summary side
329329
diff-tree --cc --stat --summary side
330-
diff-tree --cc --shortstat master
330+
diff-tree --cc --shortstat main
331331
diff-tree --cc --summary REVERSE
332332
# improved by Timo's patch
333-
diff-tree --cc --patch-with-stat master
333+
diff-tree --cc --patch-with-stat main
334334
# improved by Timo's patch
335-
diff-tree --cc --patch-with-stat --summary master
335+
diff-tree --cc --patch-with-stat --summary main
336336
# this is correct
337337
diff-tree --cc --patch-with-stat --summary side
338338
339-
log master
340-
log -p master
341-
log --root master
342-
log --root -p master
343-
log --patch-with-stat master
344-
log --root --patch-with-stat master
345-
log --root --patch-with-stat --summary master
339+
log main
340+
log -p main
341+
log --root main
342+
log --root -p main
343+
log --patch-with-stat main
344+
log --root --patch-with-stat main
345+
log --root --patch-with-stat --summary main
346346
# improved by Timo's patch
347-
log --root -c --patch-with-stat --summary master
347+
log --root -c --patch-with-stat --summary main
348348
# improved by Timo's patch
349-
log --root --cc --patch-with-stat --summary master
350-
log --no-diff-merges -p --first-parent master
351-
log --diff-merges=off -p --first-parent master
352-
log --first-parent --diff-merges=off -p master
353-
log -p --first-parent master
354-
log -p --diff-merges=first-parent master
355-
log --diff-merges=first-parent master
356-
log -m -p --first-parent master
357-
log -m -p master
358-
log --cc -m -p master
359-
log -c -m -p master
360-
log -m --raw master
361-
log -m --stat master
362-
log -SF master
363-
log -S F master
364-
log -SF -p master
365-
log -SF master --max-count=0
366-
log -SF master --max-count=1
367-
log -SF master --max-count=2
368-
log -GF master
369-
log -GF -p master
370-
log -GF -p --pickaxe-all master
371-
log -IA -IB -I1 -I2 -p master
349+
log --root --cc --patch-with-stat --summary main
350+
log --no-diff-merges -p --first-parent main
351+
log --diff-merges=off -p --first-parent main
352+
log --first-parent --diff-merges=off -p main
353+
log -p --first-parent main
354+
log -p --diff-merges=first-parent main
355+
log --diff-merges=first-parent main
356+
log -m -p --first-parent main
357+
log -m -p main
358+
log --cc -m -p main
359+
log -c -m -p main
360+
log -m --raw main
361+
log -m --stat main
362+
log -SF main
363+
log -S F main
364+
log -SF -p main
365+
log -SF main --max-count=0
366+
log -SF main --max-count=1
367+
log -SF main --max-count=2
368+
log -GF main
369+
log -GF -p main
370+
log -GF -p --pickaxe-all main
371+
log -IA -IB -I1 -I2 -p main
372372
log --decorate --all
373373
log --decorate=full --all
374374
log --decorate --clear-decorations --all
@@ -377,35 +377,35 @@ log --decorate=full --clear-decorations --all
377377
rev-list --parents HEAD
378378
rev-list --children HEAD
379379
380-
whatchanged master
381-
:noellipses whatchanged master
382-
whatchanged -p master
383-
whatchanged --root master
384-
:noellipses whatchanged --root master
385-
whatchanged --root -p master
386-
whatchanged --patch-with-stat master
387-
whatchanged --root --patch-with-stat master
388-
whatchanged --root --patch-with-stat --summary master
380+
whatchanged main
381+
:noellipses whatchanged main
382+
whatchanged -p main
383+
whatchanged --root main
384+
:noellipses whatchanged --root main
385+
whatchanged --root -p main
386+
whatchanged --patch-with-stat main
387+
whatchanged --root --patch-with-stat main
388+
whatchanged --root --patch-with-stat --summary main
389389
# improved by Timo's patch
390-
whatchanged --root -c --patch-with-stat --summary master
390+
whatchanged --root -c --patch-with-stat --summary main
391391
# improved by Timo's patch
392-
whatchanged --root --cc --patch-with-stat --summary master
393-
whatchanged -SF master
394-
:noellipses whatchanged -SF master
395-
whatchanged -SF -p master
392+
whatchanged --root --cc --patch-with-stat --summary main
393+
whatchanged -SF main
394+
:noellipses whatchanged -SF main
395+
whatchanged -SF -p main
396396
397-
log --patch-with-stat master -- dir/
398-
whatchanged --patch-with-stat master -- dir/
399-
log --patch-with-stat --summary master -- dir/
400-
whatchanged --patch-with-stat --summary master -- dir/
397+
log --patch-with-stat main -- dir/
398+
whatchanged --patch-with-stat main -- dir/
399+
log --patch-with-stat --summary main -- dir/
400+
whatchanged --patch-with-stat --summary main -- dir/
401401
402402
show initial
403403
show --root initial
404404
show side
405-
show master
406-
show -c master
407-
show -m master
408-
show --first-parent master
405+
show main
406+
show -c main
407+
show -m main
408+
show --first-parent main
409409
show --stat side
410410
show --stat --summary side
411411
show --patch-with-stat side
@@ -414,22 +414,22 @@ show --patch-with-raw side
414414
show --patch-with-stat --summary side
415415
416416
format-patch --stdout initial..side
417-
format-patch --stdout initial..master^
418-
format-patch --stdout initial..master
419-
format-patch --stdout --no-numbered initial..master
420-
format-patch --stdout --numbered initial..master
417+
format-patch --stdout initial..main^
418+
format-patch --stdout initial..main
419+
format-patch --stdout --no-numbered initial..main
420+
format-patch --stdout --numbered initial..main
421421
format-patch --attach --stdout initial..side
422422
format-patch --attach --stdout --suffix=.diff initial..side
423-
format-patch --attach --stdout initial..master^
424-
format-patch --attach --stdout initial..master
423+
format-patch --attach --stdout initial..main^
424+
format-patch --attach --stdout initial..main
425425
format-patch --inline --stdout initial..side
426-
format-patch --inline --stdout initial..master^
427-
format-patch --inline --stdout --numbered-files initial..master
428-
format-patch --inline --stdout initial..master
429-
format-patch --inline --stdout --subject-prefix=TESTCASE initial..master
426+
format-patch --inline --stdout initial..main^
427+
format-patch --inline --stdout --numbered-files initial..main
428+
format-patch --inline --stdout initial..main
429+
format-patch --inline --stdout --subject-prefix=TESTCASE initial..main
430430
config format.subjectprefix DIFFERENT_PREFIX
431-
format-patch --inline --stdout initial..master^^
432-
format-patch --stdout --cover-letter -n initial..master^
431+
format-patch --inline --stdout initial..main^^
432+
format-patch --stdout --cover-letter -n initial..main^
433433
434434
diff --abbrev initial..side
435435
diff -U initial..side
@@ -448,13 +448,13 @@ diff --name-status dir2 dir
448448
diff --no-index --name-status dir2 dir
449449
diff --no-index --name-status -- dir2 dir
450450
diff --no-index dir dir3
451-
diff master master^ side
451+
diff main main^ side
452452
# Can't use spaces...
453-
diff --line-prefix=abc master master^ side
454-
diff --dirstat master~1 master~2
453+
diff --line-prefix=abc main main^ side
454+
diff --dirstat main~1 main~2
455455
diff --dirstat initial rearrange
456456
diff --dirstat-by-file initial rearrange
457-
diff --dirstat --cc master~1 master
457+
diff --dirstat --cc main~1 main
458458
# No-index --abbrev and --no-abbrev
459459
diff --raw initial
460460
:noellipses diff --raw initial
@@ -482,25 +482,25 @@ test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this
482482
'
483483

484484
test_expect_success 'log -m matches pure log' '
485-
git log master >result &&
485+
git log main >result &&
486486
process_diffs result >expected &&
487487
git log -m >result &&
488488
process_diffs result >actual &&
489489
test_cmp expected actual
490490
'
491491

492492
test_expect_success 'log --diff-merges=on matches --diff-merges=separate' '
493-
git log -p --diff-merges=separate master >result &&
493+
git log -p --diff-merges=separate main >result &&
494494
process_diffs result >expected &&
495-
git log -p --diff-merges=on master >result &&
495+
git log -p --diff-merges=on main >result &&
496496
process_diffs result >actual &&
497497
test_cmp expected actual
498498
'
499499

500500
test_expect_success 'log --dd matches --diff-merges=1 -p' '
501-
git log --diff-merges=1 -p master >result &&
501+
git log --diff-merges=1 -p main >result &&
502502
process_diffs result >expected &&
503-
git log --dd master >result &&
503+
git log --dd main >result &&
504504
process_diffs result >actual &&
505505
test_cmp expected actual
506506
'
@@ -511,19 +511,19 @@ test_expect_success 'deny wrong log.diffMerges config' '
511511
'
512512

513513
test_expect_success 'git config log.diffMerges first-parent' '
514-
git log -p --diff-merges=first-parent master >result &&
514+
git log -p --diff-merges=first-parent main >result &&
515515
process_diffs result >expected &&
516516
test_config log.diffMerges first-parent &&
517-
git log -p --diff-merges=on master >result &&
517+
git log -p --diff-merges=on main >result &&
518518
process_diffs result >actual &&
519519
test_cmp expected actual
520520
'
521521

522522
test_expect_success 'git config log.diffMerges first-parent vs -m' '
523-
git log -p --diff-merges=first-parent master >result &&
523+
git log -p --diff-merges=first-parent main >result &&
524524
process_diffs result >expected &&
525525
test_config log.diffMerges first-parent &&
526-
git log -p -m master >result &&
526+
git log -p -m main >result &&
527527
process_diffs result >actual &&
528528
test_cmp expected actual
529529
'
@@ -572,7 +572,7 @@ test_expect_success 'diff-tree --stdin with log formatting' '
572572
Third
573573
Second
574574
EOF
575-
git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
575+
git rev-list main | git diff-tree --stdin --format=%s -s >actual &&
576576
test_cmp expect actual
577577
'
578578

@@ -585,16 +585,16 @@ test_expect_success 'diff-tree --stdin with pathspec' '
585585
586586
dir/sub
587587
EOF
588-
git rev-list master^ |
588+
git rev-list main^ |
589589
git diff-tree -r --stdin --name-only --format=%s dir >actual &&
590590
test_cmp expect actual
591591
'
592592

593593
test_expect_success 'show A B ... -- <pathspec>' '
594594
# side touches dir/sub, file0, and file3
595-
# master^ touches dir/sub, and file1
596-
# master^^ touches dir/sub, file0, and file2
597-
git show --name-only --format="<%s>" side master^ master^^ -- dir >actual &&
595+
# main^ touches dir/sub, and file1
596+
# main^^ touches dir/sub, file0, and file2
597+
git show --name-only --format="<%s>" side main^ main^^ -- dir >actual &&
598598
cat >expect <<-\EOF &&
599599
<Side>
600600
@@ -610,7 +610,7 @@ test_expect_success 'show A B ... -- <pathspec>' '
610610
'
611611

612612
test_expect_success 'diff -I<regex>: setup' '
613-
git checkout master &&
613+
git checkout main &&
614614
test_seq 50 >file0 &&
615615
git commit -m "Set up -I<regex> test file" file0 &&
616616
test_seq 50 | sed -e "s/13/ten and three/" -e "/7\$/d" >file0 &&

t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master renamed to t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_main

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$ git diff-tree --cc --patch-with-stat --summary master
1+
$ git diff-tree --cc --patch-with-stat --summary main
22
59d314ad6f356dd08601a4cd5e530381da3e3c64
33
dir/sub | 2 ++
44
file0 | 3 +++

t/t4013/diff.diff-tree_--cc_--patch-with-stat_master renamed to t/t4013/diff.diff-tree_--cc_--patch-with-stat_main

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$ git diff-tree --cc --patch-with-stat master
1+
$ git diff-tree --cc --patch-with-stat main
22
59d314ad6f356dd08601a4cd5e530381da3e3c64
33
dir/sub | 2 ++
44
file0 | 3 +++

0 commit comments

Comments
 (0)