Git fork

t6[0-3]*: adjust the references to the default branch name "main"

Carefully excluding t6300, which sees independent development elsewhere
at the time of writing, we use `main` as the default branch name in
t6[0-3]*. This trick was performed via

$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t6[0-3]*.sh &&
git checkout HEAD -- t6300\*)

This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`
for those tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Johannes Schindelin and committed by
Junio C Hamano
1550bb6e 95cf2c01

+194 -194
+2 -2
t/t6000-rev-list-misc.sh
··· 2 2 3 3 test_description='miscellaneous rev-list tests' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 88 88 ' 89 89 90 90 test_expect_success 'symleft flag bit is propagated down from tag' ' 91 - git log --format="%m %s" --left-right v1.0...master >actual && 91 + git log --format="%m %s" --left-right v1.0...main >actual && 92 92 cat >expect <<-\EOF && 93 93 < another 94 94 < that
+2 -2
t/t6001-rev-list-graft.sh
··· 2 2 3 3 test_description='Revision traversal vs grafts and path limiter' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 23 23 git commit -a -m "Third in one history." && 24 24 A2=$(git rev-parse --verify HEAD) && 25 25 26 - rm -f .git/refs/heads/master .git/index && 26 + rm -f .git/refs/heads/main .git/index && 27 27 28 28 echo >fileA fileA again && 29 29 echo >subdir/fileB fileB again &&
+8 -8
t/t6004-rev-list-path-optim.sh
··· 4 4 5 5 d/z1 6 6 b0 b1 7 - o------------------------*----o master 7 + o------------------------*----o main 8 8 / / 9 9 o---------o----o----o----o side 10 10 a0 c0 c1 a1 c2 ··· 13 13 14 14 ' 15 15 16 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 16 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 17 17 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 18 18 19 19 . ./test-lib.sh ··· 58 58 git add c && 59 59 test_tick && 60 60 git commit -m "Side makes yet another irrelevant commit" && 61 - git checkout master && 61 + git checkout main && 62 62 echo Another >b && 63 63 echo Munged >d/z && 64 64 git add b d/z && 65 65 test_tick && 66 - git commit -m "Master touches b" && 67 - git tag master_b0 && 66 + git commit -m "Main touches b" && 67 + git tag main_b0 && 68 68 git merge side && 69 69 echo Touched >b && 70 70 git add b && 71 71 test_tick && 72 - git commit -m "Master touches b again" 72 + git commit -m "Main touches b again" 73 73 ' 74 74 75 75 test_expect_success 'path optimization 2' ' ··· 79 79 ' 80 80 81 81 test_expect_success 'pathspec with leading path' ' 82 - git rev-parse master^ master_b0 side_c0 initial >expected && 82 + git rev-parse main^ main_b0 side_c0 initial >expected && 83 83 git rev-list HEAD -- d >actual && 84 84 test_cmp expected actual 85 85 ' 86 86 87 87 test_expect_success 'pathspec with glob (1)' ' 88 - git rev-parse master^ master_b0 side_c0 initial >expected && 88 + git rev-parse main^ main_b0 side_c0 initial >expected && 89 89 git rev-list HEAD -- "d/*" >actual && 90 90 test_cmp expected actual 91 91 '
+8 -8
t/t6006-rev-list-format.sh
··· 5 5 6 6 test_description='git rev-list --pretty=format test' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 56 56 test_format () { 57 57 cat >expect.$1 58 58 test_expect_${3:-success} "format $1" " 59 - git rev-list --pretty=format:'$2' master >output.$1 && 59 + git rev-list --pretty=format:'$2' main >output.$1 && 60 60 test_cmp expect.$1 output.$1 61 61 " 62 62 } ··· 187 187 <RED>foo<GREEN>bar<BLUE>baz<RESET>xyzzy 188 188 EOF 189 189 format="%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy" && 190 - git rev-list --color --format="$format" -1 master >actual.raw && 190 + git rev-list --color --format="$format" -1 main >actual.raw && 191 191 test_decode_color <actual.raw >actual && 192 192 test_cmp expect actual 193 193 ' 194 194 195 195 test_expect_success '%S is not a placeholder for rev-list yet' ' 196 - git rev-list --format="%S" -1 master | grep "%S" 196 + git rev-list --format="%S" -1 main | grep "%S" 197 197 ' 198 198 199 199 test_expect_success 'advanced colors' ' ··· 202 202 <BOLD;RED;BYELLOW>foo<RESET> 203 203 EOF 204 204 format="%C(red yellow bold)foo%C(reset)" && 205 - git rev-list --color --format="$format" -1 master >actual.raw && 205 + git rev-list --color --format="$format" -1 main >actual.raw && 206 206 test_decode_color <actual.raw >actual && 207 207 test_cmp expect actual 208 208 ' ··· 409 409 410 410 test_expect_success '%ad respects --date=' ' 411 411 echo 2005-04-07 >expect.ad-short && 412 - git log -1 --date=short --pretty=tformat:%ad >output.ad-short master && 412 + git log -1 --date=short --pretty=tformat:%ad >output.ad-short main && 413 413 test_cmp expect.ad-short output.ad-short 414 414 ' 415 415 ··· 497 497 ' 498 498 499 499 test_expect_success '%gd shortens ref name' ' 500 - echo "master@{0}" >expect.gd-short && 501 - git log -g -1 --format=%gd refs/heads/master >actual.gd-short && 500 + echo "main@{0}" >expect.gd-short && 501 + git log -g -1 --format=%gd refs/heads/main >actual.gd-short && 502 502 test_cmp expect.gd-short actual.gd-short 503 503 ' 504 504
+3 -3
t/t6007-rev-list-cherry-pick-file.sh
··· 2 2 3 3 test_description='test git rev-list --cherry-pick -- file' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 34 34 test_tick && 35 35 git commit -m "E" && 36 36 git tag E && 37 - git checkout master && 37 + git checkout main && 38 38 git checkout branch foo && 39 39 test_tick && 40 40 git commit -m "B" && ··· 236 236 test_tick && 237 237 git commit -m "independent, too" foo && 238 238 test -z "$(git rev-list --left-right --cherry-pick \ 239 - HEAD...master -- foo)" 239 + HEAD...main -- foo)" 240 240 ' 241 241 242 242 cat >expect <<EOF
+2 -2
t/t6008-rev-list-submodule.sh
··· 5 5 6 6 test_description='git rev-list involving submodules that this repo has' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 39 39 ' 40 40 41 41 test_expect_success "Ilari's test" ' 42 - git rev-list --objects super master ^super^ 42 + git rev-list --objects super main ^super^ 43 43 ' 44 44 45 45 test_done
+4 -4
t/t6009-rev-list-parent.sh
··· 2 2 3 3 test_description='ancestor culling and limiting by parent number' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 48 48 test_commit seven && 49 49 git checkout -b yetanotherbranch four && 50 50 test_commit eight && 51 - git checkout master && 51 + git checkout main && 52 52 test_tick && 53 53 git merge --allow-unrelated-histories -m normalmerge newroot && 54 54 git tag normalmerge && ··· 59 59 test_tick && 60 60 git merge -m tetrapus sidebranch anotherbranch yetanotherbranch && 61 61 git tag tetrapus && 62 - git checkout master 62 + git checkout main 63 63 ' 64 64 65 65 test_expect_success 'rev-list roots' ' ··· 126 126 roots="$roots root$i" || 127 127 return 128 128 done && 129 - git checkout master && 129 + git checkout main && 130 130 test_tick && 131 131 git merge -m dodecapus $roots && 132 132 git tag dodecapus &&
+5 -5
t/t6012-rev-list-simplify.sh
··· 2 2 3 3 test_description='merge simplification' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 46 46 git add side && 47 47 test_tick && git commit -m "Side root" && 48 48 note J && 49 - git checkout master && 49 + git checkout main && 50 50 51 51 echo "Hello" >file && 52 52 echo "second" >lost && ··· 68 68 note D && 69 69 70 70 test_tick && 71 - test_must_fail git merge -m "merge" master && 71 + test_must_fail git merge -m "merge" main && 72 72 >lost && git commit -a -m "merge" && 73 73 note E && 74 74 ··· 77 77 test_tick && git commit -m "Irrelevant change" && 78 78 note F && 79 79 80 - git checkout master && 80 + git checkout main && 81 81 echo "Yet another" >elif && 82 82 git add elif && 83 83 test_tick && git commit -m "Another irrelevant change" && ··· 90 90 test_tick && git commit -a -m "Final change" && 91 91 note I && 92 92 93 - git checkout master && 93 + git checkout main && 94 94 test_tick && git merge --allow-unrelated-histories -m "Coolest" unrelated && 95 95 note K && 96 96
+6 -6
t/t6013-rev-list-reverse-parents.sh
··· 2 2 3 3 test_description='--reverse combines with --parents' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 21 21 commit two && 22 22 git checkout -b side HEAD^ && 23 23 commit three && 24 - git checkout master && 24 + git checkout main && 25 25 git merge -s ours side && 26 26 commit five 27 27 ' 28 28 29 29 test_expect_success '--reverse --parents --full-history combines correctly' ' 30 - git rev-list --parents --full-history master -- foo | 30 + git rev-list --parents --full-history main -- foo | 31 31 perl -e "print reverse <>" > expected && 32 - git rev-list --reverse --parents --full-history master -- foo \ 32 + git rev-list --reverse --parents --full-history main -- foo \ 33 33 > actual && 34 34 test_cmp expected actual 35 35 ' 36 36 37 37 test_expect_success '--boundary does too' ' 38 - git rev-list --boundary --parents --full-history master ^root -- foo | 38 + git rev-list --boundary --parents --full-history main ^root -- foo | 39 39 perl -e "print reverse <>" > expected && 40 40 git rev-list --boundary --reverse --parents --full-history \ 41 - master ^root -- foo > actual && 41 + main ^root -- foo > actual && 42 42 test_cmp expected actual 43 43 ' 44 44
+2 -2
t/t6016-rev-list-graph-simplify-history.sh
··· 7 7 8 8 test_description='--graph and simplified history' 9 9 10 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 10 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 11 11 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 12 12 13 13 . ./test-lib.sh ··· 17 17 test_commit A1 foo.txt && 18 18 test_commit A2 bar.txt && 19 19 test_commit A3 bar.txt && 20 - git branch -m master A && 20 + git branch -m main A && 21 21 22 22 # 2 commits on branch B, started from A1 23 23 git checkout -b B A1 &&
+5 -5
t/t6017-rev-list-stdin.sh
··· 5 5 6 6 test_description='log family learns --stdin' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 43 43 done && 44 44 for i in $them 45 45 do 46 - git checkout -b side-$i master~$i && 46 + git checkout -b side-$i main~$i && 47 47 echo updated $i >file-$i && 48 48 git add file-$i && 49 49 test_tick && ··· 52 52 ) 53 53 ' 54 54 55 - check master 55 + check main 56 56 check side-1 ^side-4 57 57 check side-1 ^side-7 -- 58 58 check side-1 ^side-7 -- file-1 ··· 69 69 file-2 70 70 EOF 71 71 cat >input <<-EOF && 72 - ^master^ 72 + ^main^ 73 73 -- 74 74 file-2 75 75 EOF 76 - git log --pretty=tformat:%s --name-only --stdin master -- file-1 \ 76 + git log --pretty=tformat:%s --name-only --stdin main -- file-1 \ 77 77 <input >actual && 78 78 test_cmp expect actual 79 79 '
+26 -26
t/t6018-rev-list-glob.sh
··· 2 2 3 3 test_description='rev-list/rev-parse --glob' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 23 23 24 24 test_expect_success 'setup' ' 25 25 26 - commit master && 27 - git checkout -b subspace/one master && 26 + commit main && 27 + git checkout -b subspace/one main && 28 28 commit one && 29 - git checkout -b subspace/two master && 29 + git checkout -b subspace/two main && 30 30 commit two && 31 - git checkout -b subspace-x master && 31 + git checkout -b subspace-x main && 32 32 commit subspace-x && 33 - git checkout -b other/three master && 33 + git checkout -b other/three main && 34 34 commit three && 35 - git checkout -b someref master && 35 + git checkout -b someref main && 36 36 commit some && 37 - git checkout master && 37 + git checkout main && 38 38 commit topic_2 && 39 - git tag foo/bar master && 39 + git tag foo/bar main && 40 40 commit topic_3 && 41 - git update-ref refs/remotes/foo/baz master && 41 + git update-ref refs/remotes/foo/baz main && 42 42 commit topic_4 && 43 43 git update-ref refs/remotes/upstream/one subspace/one && 44 44 git update-ref refs/remotes/upstream/two subspace/two && ··· 86 86 87 87 test_expect_failure 'rev-parse is not confused by option-like glob' ' 88 88 89 - compare rev-parse "master" "--glob --symbolic master" 89 + compare rev-parse "main" "--glob --symbolic main" 90 90 91 91 ' 92 92 ··· 114 114 115 115 ' 116 116 117 - test_expect_success 'rev-parse --glob=heads/someref/* master' ' 117 + test_expect_success 'rev-parse --glob=heads/someref/* main' ' 118 118 119 - compare rev-parse "master" "--glob=heads/someref/* master" 119 + compare rev-parse "main" "--glob=heads/someref/* main" 120 120 121 121 ' 122 122 123 123 test_expect_success 'rev-parse --glob=heads/*' ' 124 124 125 - compare rev-parse "master other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*" 125 + compare rev-parse "main other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*" 126 126 127 127 ' 128 128 ··· 139 139 ' 140 140 141 141 test_expect_success 'rev-parse --exclude with --branches' ' 142 - compare rev-parse "--exclude=*/* --branches" "master someref subspace-x" 142 + compare rev-parse "--exclude=*/* --branches" "main someref subspace-x" 143 143 ' 144 144 145 145 test_expect_success 'rev-parse --exclude with --all' ' ··· 224 224 225 225 test_expect_success 'rev-list not confused by option-like --glob arg' ' 226 226 227 - compare rev-list "master" "--glob -0 master" 227 + compare rev-list "main" "--glob -0 main" 228 228 229 229 ' 230 230 ··· 272 272 273 273 test_expect_success 'rev-list --branches' ' 274 274 275 - compare rev-list "master subspace-x someref other/three subspace/one subspace/two" "--branches" 275 + compare rev-list "main subspace-x someref other/three subspace/one subspace/two" "--branches" 276 276 277 277 ' 278 278 279 - test_expect_success 'rev-list --glob=heads/someref/* master' ' 279 + test_expect_success 'rev-list --glob=heads/someref/* main' ' 280 280 281 - compare rev-list "master" "--glob=heads/someref/* master" 281 + compare rev-list "main" "--glob=heads/someref/* main" 282 282 283 283 ' 284 284 ··· 290 290 291 291 test_expect_success 'rev-list --glob=heads/*' ' 292 292 293 - compare rev-list "master other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*" 293 + compare rev-list "main other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*" 294 294 295 295 ' 296 296 ··· 313 313 ' 314 314 315 315 test_expect_success 'rev-list --exclude with --branches' ' 316 - compare rev-list "--exclude=*/* --branches" "master someref subspace-x" 316 + compare rev-list "--exclude=*/* --branches" "main someref subspace-x" 317 317 ' 318 318 319 319 test_expect_success 'rev-list --exclude with --all' ' ··· 357 357 358 358 compare shortlog "subspace/one subspace/two" --branches=subspace && 359 359 compare shortlog \ 360 - "master subspace-x someref other/three subspace/one subspace/two" \ 360 + "main subspace-x someref other/three subspace/one subspace/two" \ 361 361 --branches && 362 - compare shortlog master "--glob=heads/someref/* master" && 362 + compare shortlog main "--glob=heads/someref/* main" && 363 363 compare shortlog "subspace/one subspace/two other/three" \ 364 364 "--glob=heads/subspace/* --glob=heads/other/*" && 365 365 compare shortlog \ 366 - "master other/three someref subspace-x subspace/one subspace/two" \ 366 + "main other/three someref subspace-x subspace/one subspace/two" \ 367 367 "--glob=heads/*" && 368 368 compare shortlog foo/bar --tags=foo && 369 369 compare shortlog "foo/bar qux/one qux/two qux/x" --tags && ··· 374 374 test_expect_failure 'shortlog accepts --glob as detached option' ' 375 375 376 376 compare shortlog \ 377 - "master other/three someref subspace-x subspace/one subspace/two" \ 377 + "main other/three someref subspace-x subspace/one subspace/two" \ 378 378 "--glob heads/*" 379 379 380 380 ' 381 381 382 382 test_expect_failure 'shortlog --glob is not confused by option-like argument' ' 383 383 384 - compare shortlog master "--glob -e master" 384 + compare shortlog main "--glob -e main" 385 385 386 386 ' 387 387
+4 -4
t/t6019-rev-list-ancestry-path.sh
··· 21 21 # --ancestry-path G..M -- G.t == L 22 22 # --ancestry-path --simplify-merges G^..M -- G.t == G L 23 23 24 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 24 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 25 25 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 26 26 27 27 . ./test-lib.sh ··· 131 131 (cd criss-cross && 132 132 git init && 133 133 test_commit A && 134 - git checkout -b xb master && 134 + git checkout -b xb main && 135 135 test_commit B && 136 - git checkout -b xc master && 136 + git checkout -b xc main && 137 137 test_commit C && 138 138 git checkout -b xbc xb -- && 139 139 git merge xc && 140 140 git checkout -b xcb xc -- && 141 141 git merge xb && 142 - git checkout master) 142 + git checkout main) 143 143 ' 144 144 145 145 # no commits in bc descend from cb
+6 -6
t/t6030-bisect-porcelain.sh
··· 6 6 7 7 exec </dev/null 8 8 9 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 9 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 10 10 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 11 11 12 12 . ./test-lib.sh ··· 92 92 grep bar ".git/BISECT_NAMES" 93 93 ' 94 94 95 - test_expect_success 'bisect reset: back in the master branch' ' 95 + test_expect_success 'bisect reset: back in the main branch' ' 96 96 git bisect reset && 97 - echo "* master" > branch.expect && 97 + echo "* main" > branch.expect && 98 98 git branch > branch.output && 99 99 cmp branch.expect branch.output 100 100 ' ··· 105 105 git bisect good $HASH1 && 106 106 git bisect bad $HASH3 && 107 107 git bisect reset && 108 - echo " master" > branch.expect && 108 + echo " main" > branch.expect && 109 109 echo "* other" >> branch.expect && 110 110 git branch > branch.output && 111 111 cmp branch.expect branch.output ··· 351 351 352 352 test_expect_success 'bisect starting with a detached HEAD' ' 353 353 git bisect reset && 354 - git checkout master^ && 354 + git checkout main^ && 355 355 HEAD=$(git rev-parse --verify HEAD) && 356 356 git bisect start && 357 357 test $HEAD = $(cat .git/BISECT_START) && ··· 719 719 test_expect_success 'bisect: demonstrate identification of damage boundary' " 720 720 git bisect reset && 721 721 git checkout broken && 722 - git bisect start broken master --no-checkout && 722 + git bisect start broken main --no-checkout && 723 723 test_must_fail git bisect run \"\$SHELL_PATH\" -c ' 724 724 GOOD=\$(git for-each-ref \"--format=%(objectname)\" refs/bisect/good-*) && 725 725 git rev-list --objects BISECT_HEAD --not \$GOOD >tmp.\$\$ &&
+28 -28
t/t6040-tracking-info.sh
··· 2 2 3 3 test_description='remote tracking stats' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 37 37 git branch -d brokenbase && 38 38 git checkout -b b6 origin 39 39 ) && 40 - git checkout -b follower --track master && 40 + git checkout -b follower --track main && 41 41 advance h 42 42 ' 43 43 ··· 61 61 ' 62 62 63 63 cat >expect <<\EOF 64 - b1 [origin/master: ahead 1, behind 1] d 65 - b2 [origin/master: ahead 1, behind 1] d 66 - b3 [origin/master: behind 1] b 67 - b4 [origin/master: ahead 2] f 64 + b1 [origin/main: ahead 1, behind 1] d 65 + b2 [origin/main: ahead 1, behind 1] d 66 + b3 [origin/main: behind 1] b 67 + b4 [origin/main: ahead 2] f 68 68 b5 [brokenbase: gone] g 69 - b6 [origin/master] c 69 + b6 [origin/main] c 70 70 EOF 71 71 72 72 test_expect_success 'branch -vv' ' ··· 86 86 ' 87 87 88 88 test_expect_success 'checkout with local tracked branch' ' 89 - git checkout master && 89 + git checkout main && 90 90 git checkout follower >actual && 91 91 test_i18ngrep "is ahead of" actual 92 92 ' ··· 103 103 ( 104 104 cd test && git checkout b6 105 105 ) >actual && 106 - test_i18ngrep "Your branch is up to date with .origin/master" actual 106 + test_i18ngrep "Your branch is up to date with .origin/main" actual 107 107 ' 108 108 109 109 test_expect_success 'status (diverged from upstream)' ' ··· 133 133 # reports nothing to commit 134 134 test_must_fail git commit --dry-run 135 135 ) >actual && 136 - test_i18ngrep "Your branch is up to date with .origin/master" actual 136 + test_i18ngrep "Your branch is up to date with .origin/main" actual 137 137 ' 138 138 139 139 cat >expect <<\EOF 140 - ## b1...origin/master [ahead 1, behind 1] 140 + ## b1...origin/main [ahead 1, behind 1] 141 141 EOF 142 142 143 143 test_expect_success 'status -s -b (diverged from upstream)' ' ··· 150 150 ' 151 151 152 152 cat >expect <<\EOF 153 - ## b1...origin/master [different] 153 + ## b1...origin/main [different] 154 154 EOF 155 155 156 156 test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' ' ··· 163 163 ' 164 164 165 165 cat >expect <<\EOF 166 - ## b1...origin/master [different] 166 + ## b1...origin/main [different] 167 167 EOF 168 168 169 169 test_expect_success 'status.aheadbehind=false status -s -b (diverged from upstream)' ' ··· 177 177 178 178 cat >expect <<\EOF 179 179 On branch b1 180 - Your branch and 'origin/master' have diverged, 180 + Your branch and 'origin/main' have diverged, 181 181 and have 1 and 1 different commits each, respectively. 182 182 EOF 183 183 ··· 201 201 202 202 cat >expect <<\EOF 203 203 On branch b1 204 - Your branch and 'origin/master' refer to different commits. 204 + Your branch and 'origin/main' refer to different commits. 205 205 EOF 206 206 207 207 test_expect_success 'status --long --branch --no-ahead-behind' ' ··· 236 236 ' 237 237 238 238 cat >expect <<\EOF 239 - ## b6...origin/master 239 + ## b6...origin/main 240 240 EOF 241 241 242 242 test_expect_success 'status -s -b (up-to-date with upstream)' ' ··· 249 249 ' 250 250 251 251 test_expect_success 'fail to track lightweight tags' ' 252 - git checkout master && 252 + git checkout main && 253 253 git tag light && 254 254 test_must_fail git branch --track lighttrack light >actual && 255 255 test_i18ngrep ! "set up to track" actual && ··· 257 257 ' 258 258 259 259 test_expect_success 'fail to track annotated tags' ' 260 - git checkout master && 260 + git checkout main && 261 261 git tag -m heavy heavy && 262 262 test_must_fail git branch --track heavytrack heavy >actual && 263 263 test_i18ngrep ! "set up to track" actual && ··· 265 265 ' 266 266 267 267 test_expect_success '--set-upstream-to does not change branch' ' 268 - git branch from-master master && 269 - git branch --set-upstream-to master from-master && 270 - git branch from-topic_2 master && 268 + git branch from-main main && 269 + git branch --set-upstream-to main from-main && 270 + git branch from-topic_2 main && 271 271 test_must_fail git config branch.from-topic_2.merge > actual && 272 272 git rev-list from-topic_2 && 273 273 git update-ref refs/heads/from-topic_2 from-topic_2^ && 274 274 git rev-parse from-topic_2 >expect2 && 275 - git branch --set-upstream-to master from-topic_2 && 276 - git config branch.from-master.merge > actual && 275 + git branch --set-upstream-to main from-topic_2 && 276 + git config branch.from-main.merge > actual && 277 277 git rev-parse from-topic_2 >actual2 && 278 - grep -q "^refs/heads/master$" actual && 278 + grep -q "^refs/heads/main$" actual && 279 279 cmp expect2 actual2 280 280 ' 281 281 ··· 283 283 git checkout follower && 284 284 git checkout from-topic_2 && 285 285 git config branch.from-topic_2.merge > expect2 && 286 - git branch --set-upstream-to @{-1} from-master && 287 - git config branch.from-master.merge > actual && 286 + git branch --set-upstream-to @{-1} from-main && 287 + git config branch.from-main.merge > actual && 288 288 git config branch.from-topic_2.merge > actual2 && 289 - git branch --set-upstream-to follower from-master && 290 - git config branch.from-master.merge > expect && 289 + git branch --set-upstream-to follower from-main && 290 + git config branch.from-main.merge > expect && 291 291 test_cmp expect2 actual2 && 292 292 test_cmp expect actual 293 293 '
+6 -6
t/t6050-replace.sh
··· 4 4 # 5 5 test_description='Tests replace refs functionality' 6 6 7 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 7 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 8 8 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 9 9 10 10 . ./test-lib.sh ··· 136 136 ' 137 137 138 138 test_expect_success '"git fsck" works' ' 139 - git fsck master >fsck_master.out && 140 - test_i18ngrep "dangling commit $R" fsck_master.out && 141 - test_i18ngrep "dangling tag $(git show-ref -s refs/tags/mytag)" fsck_master.out && 139 + git fsck main >fsck_main.out && 140 + test_i18ngrep "dangling commit $R" fsck_main.out && 141 + test_i18ngrep "dangling tag $(git show-ref -s refs/tags/mytag)" fsck_main.out && 142 142 test -z "$(git fsck)" 143 143 ' 144 144 ··· 221 221 git cherry-pick $HASH6 && 222 222 PARA6=$(git rev-parse --verify HEAD) && 223 223 git replace $HASH6 $PARA6 && 224 - git checkout master && 224 + git checkout main && 225 225 cur=$(git rev-parse --verify HEAD) && 226 226 test "$cur" = "$HASH7" && 227 227 git log --pretty=oneline | grep $PARA2 && ··· 464 464 git commit -m "hello: 2 more lines from a test branch" && 465 465 HASH9=$(git rev-parse --verify HEAD) && 466 466 git tag -s -m "tag for testing with a mergetag" test_tag HEAD && 467 - git checkout master && 467 + git checkout main && 468 468 git merge -s ours test_tag && 469 469 HASH10=$(git rev-parse --verify HEAD) && 470 470 git cat-file commit $HASH10 | grep "^mergetag object"
+2 -2
t/t6101-rev-parse-parents.sh
··· 5 5 6 6 test_description='Test git rev-parse with different parent options' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 21 21 test_commit second && 22 22 git checkout --orphan tmp && 23 23 test_commit start2 && 24 - git checkout master && 24 + git checkout main && 25 25 git merge -m next --allow-unrelated-histories start2 && 26 26 test_commit final && 27 27
+2 -2
t/t6110-rev-list-sparse.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='operations that cull histories in unusual ways' 4 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 4 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 6 7 7 . ./test-lib.sh ··· 13 13 git checkout -b side HEAD^ && 14 14 test_commit D && 15 15 test_commit E && 16 - git merge master 16 + git merge main 17 17 ' 18 18 19 19 test_expect_success 'rev-list --first-parent --boundary' '
+4 -4
t/t6111-rev-list-treesame.sh
··· 13 13 14 14 test_description='TREESAME and limiting' 15 15 16 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 16 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 17 17 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 18 18 19 19 . ./test-lib.sh ··· 36 36 git checkout other-branch && 37 37 test_commit "Added other" other "Hello" C && 38 38 39 - git checkout master && 39 + git checkout main && 40 40 test_merge D other-branch && 41 41 42 42 git checkout third-branch && 43 43 test_commit "Third file" third "Nothing" E && 44 44 45 - git checkout master && 45 + git checkout main && 46 46 test_commit "file=Blah" file "Blah" F && 47 47 48 48 test_tick && git merge --no-commit third-branch && ··· 59 59 60 60 test_tick && git revert I && note J && 61 61 62 - git checkout master && 62 + git checkout main && 63 63 test_tick && git merge --no-ff fiddler-branch && 64 64 note K && 65 65
+8 -8
t/t6112-rev-list-filters-objects.sh
··· 2 2 3 3 test_description='git rev-list using object filtering' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 226 226 sort >expected && 227 227 228 228 git -C r3 rev-list --quiet --objects --filter-print-omitted \ 229 - --filter=sparse:oid=master:pattern HEAD >revs && 229 + --filter=sparse:oid=main:pattern HEAD >revs && 230 230 awk -f print_1.awk revs | 231 231 sed "s/~//" | 232 232 sort >observed && ··· 439 439 440 440 test_expect_success 'combine:... with more than two sub-filters' ' 441 441 git -C r3 rev-list --objects \ 442 - --filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern \ 442 + --filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern \ 443 443 HEAD >actual && 444 444 445 445 expect_has HEAD "" && ··· 457 457 cp actual expect && 458 458 459 459 git -C r3 rev-list --objects \ 460 - --filter=combine:tree:3+blob:limit=40+sparse:oid=master:pattern1%2brenamed%25 \ 460 + --filter=combine:tree:3+blob:limit=40+sparse:oid=main:pattern1%2brenamed%25 \ 461 461 HEAD >actual && 462 462 test_cmp expect actual && 463 463 ··· 467 467 test_when_finished "rm -f trace1" && 468 468 GIT_TRACE=$(pwd)/trace1 git -C r3 rev-list --objects \ 469 469 --filter=tree:3 --filter=blob:limit=40 \ 470 - --filter=sparse:oid="master:p;at%ter+n" \ 470 + --filter=sparse:oid="main:p;at%ter+n" \ 471 471 HEAD >actual && 472 472 473 473 test_cmp expect actual && 474 - grep "Add to combine filter-spec: sparse:oid=master:p%3bat%25ter%2bn" \ 474 + grep "Add to combine filter-spec: sparse:oid=main:p%3bat%25ter%2bn" \ 475 475 trace1 && 476 476 477 477 # Repeat the above test, but this time, the characters to encode are in 478 478 # the LHS of the combined filter. 479 479 test_when_finished "rm -f trace2" && 480 480 GIT_TRACE=$(pwd)/trace2 git -C r3 rev-list --objects \ 481 - --filter=sparse:oid=master:^~pattern \ 481 + --filter=sparse:oid=main:^~pattern \ 482 482 --filter=tree:3 --filter=blob:limit=40 \ 483 483 HEAD >actual && 484 484 485 485 test_cmp expect actual && 486 - grep "Add to combine filter-spec: sparse:oid=master:%5e%7epattern" \ 486 + grep "Add to combine filter-spec: sparse:oid=main:%5e%7epattern" \ 487 487 trace2 488 488 ' 489 489
+11 -11
t/t6120-describe.sh
··· 11 11 # 12 12 # First parent of a merge commit is on the same line, second parent below. 13 13 14 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 14 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 15 15 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 16 16 17 17 . ./test-lib.sh ··· 105 105 check_describe B --tags HEAD^^2^ 106 106 check_describe e --tags HEAD^^^ 107 107 108 - check_describe heads/master --all HEAD 108 + check_describe heads/main --all HEAD 109 109 check_describe tags/c-* --all HEAD^ 110 110 check_describe tags/e --all HEAD^^^ 111 111 ··· 406 406 i=1 && 407 407 while test $i -lt 8000 408 408 do 409 - echo "commit refs/heads/master 409 + echo "commit refs/heads/main 410 410 committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200 411 411 data <<EOF 412 412 commit #$i 413 413 EOF" 414 - test $i = 1 && echo "from refs/heads/master^0" 414 + test $i = 1 && echo "from refs/heads/main^0" 415 415 i=$(($i + 1)) 416 416 done | git fast-import && 417 - git checkout master && 417 + git checkout main && 418 418 git tag far-far-away HEAD^ && 419 419 echo "HEAD~4000 tags/far-far-away~3999" >expect && 420 420 git name-rev HEAD~4000 >actual && ··· 445 445 ' 446 446 447 447 test_expect_success 'name-rev a rev shortly after epoch' ' 448 - test_when_finished "git checkout master" && 448 + test_when_finished "git checkout main" && 449 449 450 450 git checkout --orphan no-timestamp-underflow && 451 451 # Any date closer to epoch than the CUTOFF_DATE_SLOP constant ··· 459 459 test_cmp expect actual 460 460 ' 461 461 462 - # A--------------master 462 + # A--------------main 463 463 # \ / 464 464 # \----------M2 465 465 # \ / ··· 490 490 git checkout $A && 491 491 git merge --no-ff HEAD@{1} && # M2 492 492 493 - git checkout master && 493 + git checkout main && 494 494 git merge --no-ff HEAD@{1} && 495 495 496 - echo "$B master^2^2~1^2" >expect && 496 + echo "$B main^2^2~1^2" >expect && 497 497 git name-rev $B >actual && 498 498 499 499 test_cmp expect actual ··· 519 519 git checkout --orphan branch && rm file && 520 520 echo B > file2 && git add file2 && git commit -m B && 521 521 git tag B -a -m B && 522 - git merge --no-ff --allow-unrelated-histories master -m x && 522 + git merge --no-ff --allow-unrelated-histories main -m x && 523 523 524 524 check_describe "A-3-*" HEAD 525 525 ) ··· 545 545 echo o >> file2 && git add file2 && GIT_COMMITTER_DATE="2020-01-01 15:01" git commit -m o && 546 546 echo B >> file2 && git add file2 && GIT_COMMITTER_DATE="2020-01-01 15:02" git commit -m B && 547 547 git tag B -a -m B && 548 - git merge --no-ff --allow-unrelated-histories master -m x && 548 + git merge --no-ff --allow-unrelated-histories main -m x && 549 549 550 550 check_describe "B-3-*" HEAD 551 551 )
+26 -26
t/t6200-fmt-merge-msg.sh
··· 5 5 6 6 test_description='fmt-merge-msg test' 7 7 8 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 8 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 9 9 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 10 10 11 11 . ./test-lib.sh ··· 84 84 test_expect_success 'message for merging local branch' ' 85 85 echo "Merge branch ${apos}left${apos}" >expected && 86 86 87 - git checkout master && 87 + git checkout main && 88 88 git fetch . left && 89 89 90 90 git fmt-merge-msg <.git/FETCH_HEAD >actual && ··· 92 92 ' 93 93 94 94 test_expect_success GPG 'message for merging local tag signed by good key' ' 95 - git checkout master && 95 + git checkout main && 96 96 git fetch . signed-good-tag && 97 97 git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 && 98 98 grep "^Merge tag ${apos}signed-good-tag${apos}" actual && ··· 101 101 ' 102 102 103 103 test_expect_success GPG 'message for merging local tag signed by unknown key' ' 104 - git checkout master && 104 + git checkout main && 105 105 git fetch . signed-good-tag && 106 106 GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 && 107 107 grep "^Merge tag ${apos}signed-good-tag${apos}" actual && ··· 112 112 test_expect_success 'message for merging external branch' ' 113 113 echo "Merge branch ${apos}left${apos} of $(pwd)" >expected && 114 114 115 - git checkout master && 115 + git checkout main && 116 116 git fetch "$(pwd)" left && 117 117 118 118 git fmt-merge-msg <.git/FETCH_HEAD >actual && ··· 136 136 test_config merge.log true && 137 137 test_unconfig merge.summary && 138 138 139 - git checkout master && 139 + git checkout main && 140 140 test_tick && 141 141 git fetch . left && 142 142 ··· 145 145 test_unconfig merge.log && 146 146 test_config merge.summary true && 147 147 148 - git checkout master && 148 + git checkout main && 149 149 test_tick && 150 150 git fetch . left && 151 151 ··· 156 156 ' 157 157 158 158 test_expect_success 'setup FETCH_HEAD' ' 159 - git checkout master && 159 + git checkout main && 160 160 test_tick && 161 161 git fetch . left 162 162 ' ··· 284 284 285 285 test_unconfig merge.log && 286 286 test_unconfig merge.summary && 287 - git checkout master && 287 + git checkout main && 288 288 git fetch "$(pwd)" left && 289 289 git fmt-merge-msg -m "Sync with left" <.git/FETCH_HEAD >actual && 290 290 git fmt-merge-msg --log -m "Sync with left" \ ··· 326 326 test_expect_success 'shortlog for two branches' ' 327 327 test_config merge.log true && 328 328 test_unconfig merge.summary && 329 - git checkout master && 329 + git checkout main && 330 330 test_tick && 331 331 git fetch . left right && 332 332 git fmt-merge-msg <.git/FETCH_HEAD >actual1 && 333 333 334 334 test_unconfig merge.log && 335 335 test_config merge.summary true && 336 - git checkout master && 336 + git checkout main && 337 337 test_tick && 338 338 git fetch . left right && 339 339 git fmt-merge-msg <.git/FETCH_HEAD >actual2 && 340 340 341 341 test_config merge.log yes && 342 342 test_unconfig merge.summary && 343 - git checkout master && 343 + git checkout main && 344 344 test_tick && 345 345 git fetch . left right && 346 346 git fmt-merge-msg <.git/FETCH_HEAD >actual3 && 347 347 348 348 test_unconfig merge.log && 349 349 test_config merge.summary yes && 350 - git checkout master && 350 + git checkout main && 351 351 test_tick && 352 352 git fetch . left right && 353 353 git fmt-merge-msg <.git/FETCH_HEAD >actual4 && ··· 361 361 test_expect_success 'merge-msg -F' ' 362 362 test_unconfig merge.log && 363 363 test_config merge.summary yes && 364 - git checkout master && 364 + git checkout main && 365 365 test_tick && 366 366 git fetch . left right && 367 367 git fmt-merge-msg -F .git/FETCH_HEAD >actual && ··· 371 371 test_expect_success 'merge-msg -F in subdirectory' ' 372 372 test_unconfig merge.log && 373 373 test_config merge.summary yes && 374 - git checkout master && 374 + git checkout main && 375 375 test_tick && 376 376 git fetch . left right && 377 377 mkdir sub && ··· 411 411 test_unconfig merge.log && 412 412 test_config merge.summary yes && 413 413 414 - git checkout master && 414 + git checkout main && 415 415 test_tick && 416 416 git fetch . tag tag-r3 && 417 417 ··· 441 441 test_unconfig merge.log && 442 442 test_config merge.summary yes && 443 443 444 - git checkout master && 444 + git checkout main && 445 445 test_tick && 446 446 git fetch . tag tag-r3 tag tag-l5 && 447 447 ··· 471 471 test_unconfig merge.log && 472 472 test_config merge.summary yes && 473 473 474 - git checkout master && 474 + git checkout main && 475 475 test_tick && 476 476 git fetch . tag tag-r3 left && 477 477 ··· 498 498 499 499 test_config merge.summary yes && 500 500 501 - git checkout master && 501 + git checkout main && 502 502 test_tick && 503 503 git fetch . long && 504 504 ··· 509 509 test_expect_success 'merge-msg with "merging" an annotated tag' ' 510 510 test_config merge.log true && 511 511 512 - git checkout master^0 && 512 + git checkout main^0 && 513 513 git commit --allow-empty -m "One step ahead" && 514 514 git tag -a -m "An annotated one" annote HEAD && 515 515 516 - git checkout master && 516 + git checkout main && 517 517 git fetch . annote && 518 518 519 519 git fmt-merge-msg <.git/FETCH_HEAD >actual && ··· 546 546 ' 547 547 548 548 test_expect_success 'merge.suppressDest configuration' ' 549 - git checkout -B side master && 549 + git checkout -B side main && 550 550 git commit --allow-empty -m "One step ahead" && 551 - git checkout master && 551 + git checkout main && 552 552 git fetch . side && 553 553 554 554 git -c merge.suppressDest="" fmt-merge-msg <.git/FETCH_HEAD >full.1 && 555 555 head -n1 full.1 >actual && 556 - grep -e "Merge branch .side. into master" actual && 556 + grep -e "Merge branch .side. into main" actual && 557 557 558 558 git -c merge.suppressDest="mast" fmt-merge-msg <.git/FETCH_HEAD >full.2 && 559 559 head -n1 full.2 >actual && 560 - grep -e "Merge branch .side. into master$" actual && 560 + grep -e "Merge branch .side. into main$" actual && 561 561 562 562 git -c merge.suppressDest="ma?*[rn]" fmt-merge-msg <.git/FETCH_HEAD >full.3 && 563 563 head -n1 full.3 >actual && 564 564 grep -e "Merge branch .side." actual && 565 - ! grep -e " into master$" actual 565 + ! grep -e " into main$" actual 566 566 ' 567 567 568 568 test_done
+24 -24
t/t6302-for-each-ref-filter.sh
··· 2 2 3 3 test_description='test for-each-refs usage of ref-filter APIs' 4 4 5 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 5 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 7 8 8 . ./test-lib.sh ··· 29 29 git tag $sign -m "A signed tag" signed-tag && 30 30 git tag $sign -m "Signed doubly" doubly-signed-tag signed-tag && 31 31 32 - git checkout master && 33 - git update-ref refs/odd/spot master 32 + git checkout main && 33 + git update-ref refs/odd/spot main 34 34 ' 35 35 36 36 test_expect_success 'filtering with --points-at' ' 37 37 cat >expect <<-\EOF && 38 - refs/heads/master 38 + refs/heads/main 39 39 refs/odd/spot 40 40 refs/tags/three 41 41 EOF 42 - git for-each-ref --format="%(refname)" --points-at=master >actual && 42 + git for-each-ref --format="%(refname)" --points-at=main >actual && 43 43 test_cmp expect actual 44 44 ' 45 45 ··· 56 56 57 57 test_expect_success 'filtering with --merged' ' 58 58 cat >expect <<-\EOF && 59 - refs/heads/master 59 + refs/heads/main 60 60 refs/odd/spot 61 61 refs/tags/one 62 62 refs/tags/three 63 63 refs/tags/two 64 64 EOF 65 - git for-each-ref --format="%(refname)" --merged=master >actual && 65 + git for-each-ref --format="%(refname)" --merged=main >actual && 66 66 test_cmp expect actual 67 67 ' 68 68 ··· 75 75 refs/tags/four 76 76 refs/tags/signed-tag 77 77 EOF 78 - git for-each-ref --format="%(refname)" --no-merged=master >actual && 78 + git for-each-ref --format="%(refname)" --no-merged=main >actual && 79 79 test_cmp expect actual 80 80 ' 81 81 82 82 test_expect_success 'filtering with --contains' ' 83 83 cat >expect <<-\EOF && 84 - refs/heads/master 84 + refs/heads/main 85 85 refs/heads/side 86 86 refs/odd/spot 87 87 refs/tags/annotated-tag ··· 254 254 255 255 test_expect_success 'check `%(contents:lines=1)`' ' 256 256 cat >expect <<-\EOF && 257 - master |three 257 + main |three 258 258 side |four 259 259 odd/spot |three 260 260 annotated-tag |An annotated tag ··· 272 272 273 273 test_expect_success 'check `%(contents:lines=0)`' ' 274 274 cat >expect <<-\EOF && 275 - master | 275 + main | 276 276 side | 277 277 odd/spot | 278 278 annotated-tag | ··· 290 290 291 291 test_expect_success 'check `%(contents:lines=99999)`' ' 292 292 cat >expect <<-\EOF && 293 - master |three 293 + main |three 294 294 side |four 295 295 odd/spot |three 296 296 annotated-tag |An annotated tag ··· 363 363 test_expect_success 'check %(if)...%(then)...%(end) atoms' ' 364 364 git for-each-ref --format="%(refname)%(if)%(authorname)%(then) Author: %(authorname)%(end)" >actual && 365 365 cat >expect <<-\EOF && 366 - refs/heads/master Author: A U Thor 366 + refs/heads/main Author: A U Thor 367 367 refs/heads/side Author: A U Thor 368 368 refs/odd/spot Author: A U Thor 369 369 refs/tags/annotated-tag ··· 384 384 test_expect_success 'check %(if)...%(then)...%(else)...%(end) atoms' ' 385 385 git for-each-ref --format="%(if)%(authorname)%(then)%(authorname)%(else)No author%(end): %(refname)" >actual && 386 386 cat >expect <<-\EOF && 387 - A U Thor: refs/heads/master 387 + A U Thor: refs/heads/main 388 388 A U Thor: refs/heads/side 389 389 A U Thor: refs/odd/spot 390 390 No author: refs/tags/annotated-tag ··· 404 404 test_expect_success 'ignore spaces in %(if) atom usage' ' 405 405 git for-each-ref --format="%(refname:short): %(if)%(HEAD)%(then)Head ref%(else)Not Head ref%(end)" >actual && 406 406 cat >expect <<-\EOF && 407 - master: Head ref 407 + main: Head ref 408 408 side: Not Head ref 409 409 odd/spot: Not Head ref 410 410 annotated-tag: Not Head ref ··· 423 423 ' 424 424 425 425 test_expect_success 'check %(if:equals=<string>)' ' 426 - git for-each-ref --format="%(if:equals=master)%(refname:short)%(then)Found master%(else)Not master%(end)" refs/heads/ >actual && 426 + git for-each-ref --format="%(if:equals=main)%(refname:short)%(then)Found main%(else)Not main%(end)" refs/heads/ >actual && 427 427 cat >expect <<-\EOF && 428 - Found master 429 - Not master 428 + Found main 429 + Not main 430 430 EOF 431 431 test_cmp expect actual 432 432 ' 433 433 434 434 test_expect_success 'check %(if:notequals=<string>)' ' 435 - git for-each-ref --format="%(if:notequals=master)%(refname:short)%(then)Not master%(else)Found master%(end)" refs/heads/ >actual && 435 + git for-each-ref --format="%(if:notequals=main)%(refname:short)%(then)Not main%(else)Found main%(end)" refs/heads/ >actual && 436 436 cat >expect <<-\EOF && 437 - Found master 438 - Not master 437 + Found main 438 + Not main 439 439 EOF 440 440 test_cmp expect actual 441 441 ' ··· 446 446 447 447 test_expect_success 'validate worktree atom' ' 448 448 cat >expect <<-EOF && 449 - master: $(pwd) 450 - master_worktree: $(pwd)/worktree_dir 449 + main: $(pwd) 450 + main_worktree: $(pwd)/worktree_dir 451 451 side: not checked out 452 452 EOF 453 - git worktree add -b master_worktree worktree_dir master && 453 + git worktree add -b main_worktree worktree_dir main && 454 454 git for-each-ref --format="%(refname:short): %(if)%(worktreepath)%(then)%(worktreepath)%(else)not checked out%(end)" refs/heads/ >actual && 455 455 rm -r worktree_dir && 456 456 git worktree prune &&