Git fork

t3[5-9]*: adjust the references to the default branch name "main"

This trick was performed via

$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t3[5-9]*.sh)

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
cbc75a12 d1c02d93

+126 -126
+7 -7
t/t3500-cherry.sh
··· 5 5 6 6 test_description='git cherry should detect patches integrated upstream 7 7 8 - This test cherry-picks one local change of two into master branch, and 8 + This test cherry-picks one local change of two into main branch, and 9 9 checks that git cherry only returns the second patch in the local branch 10 10 ' 11 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 11 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 12 12 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 13 13 14 14 . ./test-lib.sh ··· 35 35 test_tick && 36 36 git commit -m "Add C." && 37 37 38 - git checkout -f master && 38 + git checkout -f main && 39 39 rm -f B C && 40 40 41 41 echo Third >> A && ··· 43 43 test_tick && 44 44 git commit -m "Modify A." && 45 45 46 - expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*" 46 + expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*" 47 47 ' 48 48 49 49 test_expect_success \ 50 50 'check that cherry with limit returns only the top patch'\ 51 - 'expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*" 51 + 'expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*" 52 52 ' 53 53 54 54 test_expect_success \ 55 55 'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \ 56 56 'git cherry-pick my-topic-branch^0 && 57 - echo $(git cherry master my-topic-branch) && 58 - expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*" 57 + echo $(git cherry main my-topic-branch) && 58 + expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*" 59 59 ' 60 60 61 61 test_expect_success 'cherry ignores whitespace' '
+3 -3
t/t3501-revert-cherry-pick.sh
··· 10 10 11 11 ' 12 12 13 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 13 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 14 14 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 15 15 16 16 . ./test-lib.sh ··· 115 115 test_expect_success 'cherry-pick "-" to pick from previous branch' ' 116 116 git checkout unborn && 117 117 test_commit to-pick actual content && 118 - git checkout master && 118 + git checkout main && 119 119 git cherry-pick - && 120 120 echo content >expect && 121 121 test_cmp expect actual ··· 135 135 test_expect_success 'cherry-pick "-" works with arguments' ' 136 136 git checkout -b side-branch && 137 137 test_commit change actual change && 138 - git checkout master && 138 + git checkout main && 139 139 git cherry-pick -s - && 140 140 echo "Signed-off-by: C O Mitter <committer@example.com>" >expect && 141 141 git cat-file commit HEAD | grep ^Signed-off-by: >signoff &&
+2 -2
t/t3502-cherry-pick-merge.sh
··· 8 8 9 9 ' 10 10 11 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 11 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 12 12 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 13 13 14 14 . ./test-lib.sh ··· 28 28 echo new line >B && 29 29 git commit -m "add line to B" B && 30 30 git tag b && 31 - git checkout master && 31 + git checkout main && 32 32 git merge side && 33 33 git tag c 34 34
+6 -6
t/t3503-cherry-pick-root.sh
··· 2 2 3 3 test_description='test cherry-picking (and reverting) a root commit' 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 ··· 33 33 test_expect_success 'cherry-pick a root commit' ' 34 34 35 35 git checkout second^0 && 36 - git cherry-pick master && 36 + git cherry-pick main && 37 37 echo first >expect && 38 38 test_cmp expect file1 39 39 ··· 41 41 42 42 test_expect_success 'revert a root commit' ' 43 43 44 - git revert master && 44 + git revert main && 45 45 test_path_is_missing file1 46 46 47 47 ' 48 48 49 49 test_expect_success 'cherry-pick a root commit with an external strategy' ' 50 50 51 - git cherry-pick --strategy=resolve master && 51 + git cherry-pick --strategy=resolve main && 52 52 echo first >expect && 53 53 test_cmp expect file1 54 54 ··· 56 56 57 57 test_expect_success 'revert a root commit with an external strategy' ' 58 58 59 - git revert --strategy=resolve master && 59 + git revert --strategy=resolve main && 60 60 test_path_is_missing file1 61 61 62 62 ' ··· 68 68 echo third >expect.file3 && 69 69 70 70 git checkout second^0 && 71 - git cherry-pick master third && 71 + git cherry-pick main third && 72 72 73 73 test_cmp expect.file1 file1 && 74 74 test_cmp expect.file2 file2 &&
+13 -13
t/t3504-cherry-pick-rerere.sh
··· 2 2 3 3 test_description='cherry-pick should rerere for conflicts' 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 9 9 10 10 test_expect_success setup ' 11 11 test_commit foo && 12 - test_commit foo-master foo && 13 - test_commit bar-master bar && 12 + test_commit foo-main foo && 13 + test_commit bar-main bar && 14 14 15 15 git checkout -b dev foo && 16 16 test_commit foo-dev foo && ··· 19 19 ' 20 20 21 21 test_expect_success 'conflicting merge' ' 22 - test_must_fail git merge master 22 + test_must_fail git merge main 23 23 ' 24 24 25 25 test_expect_success 'fixup' ' ··· 32 32 ' 33 33 34 34 test_expect_success 'cherry-pick conflict with --rerere-autoupdate' ' 35 - test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master && 35 + test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main && 36 36 test_cmp foo-expect foo && 37 37 git diff-files --quiet && 38 38 test_must_fail git cherry-pick --continue && ··· 44 44 45 45 test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' ' 46 46 test_config rerere.autoUpdate true && 47 - test_must_fail git cherry-pick foo..bar-master && 47 + test_must_fail git cherry-pick foo..bar-main && 48 48 test_cmp foo-expect foo && 49 49 git diff-files --quiet && 50 50 test_must_fail git cherry-pick --continue && ··· 56 56 57 57 test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' ' 58 58 test_config rerere.autoUpdate true && 59 - test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master && 59 + test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main && 60 60 test_cmp foo-expect foo && 61 61 test_must_fail git diff-files --quiet && 62 62 git add foo && ··· 69 69 ' 70 70 71 71 test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' ' 72 - test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master && 72 + test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main && 73 73 test_cmp foo-expect foo && 74 74 git diff-files --quiet && 75 75 test_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 && ··· 82 82 ' 83 83 84 84 test_expect_success 'cherry-pick --rerere-autoupdate more than once' ' 85 - test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master && 85 + test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main && 86 86 test_cmp foo-expect foo && 87 87 git diff-files --quiet && 88 88 git cherry-pick --abort && 89 - test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master && 89 + test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main && 90 90 test_cmp foo-expect foo && 91 91 git diff-files --quiet && 92 92 git cherry-pick --abort && 93 - test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master && 93 + test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main && 94 94 test_must_fail git diff-files --quiet && 95 95 git cherry-pick --abort 96 96 ' 97 97 98 98 test_expect_success 'cherry-pick conflict without rerere' ' 99 99 test_config rerere.enabled false && 100 - test_must_fail git cherry-pick foo-master && 100 + test_must_fail git cherry-pick foo-main && 101 101 grep ===== foo && 102 102 grep foo-dev foo && 103 - grep foo-master foo 103 + grep foo-main foo 104 104 ' 105 105 106 106 test_done
+13 -13
t/t3505-cherry-pick-empty.sh
··· 2 2 3 3 test_description='test cherry-picking an empty commit' 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 ··· 20 20 test_tick && 21 21 git commit --allow-empty-message -m "" && 22 22 23 - git checkout master && 23 + git checkout main && 24 24 git checkout -b empty-change-branch && 25 25 test_tick && 26 26 git commit --allow-empty -m "empty" ··· 28 28 ' 29 29 30 30 test_expect_success 'cherry-pick an empty commit' ' 31 - git checkout master && 31 + git checkout main && 32 32 test_expect_code 1 git cherry-pick empty-change-branch 33 33 ' 34 34 ··· 38 38 39 39 test_expect_success 'cherry-pick a commit with an empty message' ' 40 40 test_when_finished "git reset --hard empty-message-branch~1" && 41 - git checkout master && 41 + git checkout main && 42 42 git cherry-pick empty-message-branch 43 43 ' 44 44 ··· 47 47 ' 48 48 49 49 test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' ' 50 - git checkout -f master && 50 + git checkout -f main && 51 51 git cherry-pick --allow-empty-message empty-message-branch 52 52 ' 53 53 54 54 test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' ' 55 - git checkout master && 55 + git checkout main && 56 56 echo fourth >>file2 && 57 57 git add file2 && 58 58 git commit -m "fourth" && ··· 60 60 ' 61 61 62 62 test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' ' 63 - git checkout master && 63 + git checkout main && 64 64 git cherry-pick --allow-empty empty-change-branch 65 65 ' 66 66 67 67 test_expect_success 'cherry pick with --keep-redundant-commits' ' 68 - git checkout master && 68 + git checkout main && 69 69 git cherry-pick --keep-redundant-commits HEAD^ 70 70 ' 71 71 72 72 test_expect_success 'cherry-pick a commit that becomes no-op (prep)' ' 73 - git checkout master && 73 + git checkout main && 74 74 git branch fork && 75 75 echo foo >file2 && 76 76 git add file2 && 77 77 test_tick && 78 - git commit -m "add file2 on master" && 78 + git commit -m "add file2 on main" && 79 79 80 80 git checkout fork && 81 81 echo foo >file2 && ··· 87 87 test_expect_success 'cherry-pick a no-op without --keep-redundant' ' 88 88 git reset --hard && 89 89 git checkout fork^0 && 90 - test_must_fail git cherry-pick master 90 + test_must_fail git cherry-pick main 91 91 ' 92 92 93 93 test_expect_success 'cherry-pick a no-op with --keep-redundant' ' 94 94 git reset --hard && 95 95 git checkout fork^0 && 96 - git cherry-pick --keep-redundant-commits master && 96 + git cherry-pick --keep-redundant-commits main && 97 97 git show -s --format=%s >actual && 98 - echo "add file2 on master" >expect && 98 + echo "add file2 on main" >expect && 99 99 test_cmp expect actual 100 100 ' 101 101
+5 -5
t/t3506-cherry-pick-ff.sh
··· 2 2 3 3 test_description='test cherry-picking with --ff option' 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 ··· 27 27 ' 28 28 29 29 test_expect_success 'cherry-pick using --ff fast forwards' ' 30 - git checkout master && 30 + git checkout main && 31 31 git reset --hard first && 32 32 test_tick && 33 33 git cherry-pick --ff second && ··· 35 35 ' 36 36 37 37 test_expect_success 'cherry-pick not using --ff does not fast forwards' ' 38 - git checkout master && 38 + git checkout main && 39 39 git reset --hard first && 40 40 test_tick && 41 41 git cherry-pick second && ··· 52 52 # (This has been taken from t3502-cherry-pick-merge.sh) 53 53 # 54 54 test_expect_success 'merge setup' ' 55 - git checkout master && 55 + git checkout main && 56 56 git reset --hard first && 57 57 echo new line >A && 58 58 git add A && ··· 65 65 test_tick && 66 66 git commit -m "add line to B" B && 67 67 git tag B && 68 - git checkout master && 68 + git checkout main && 69 69 git merge side && 70 70 git tag C && 71 71 git checkout -b new A
+2 -2
t/t3507-cherry-pick-conflict.sh
··· 9 9 10 10 ' 11 11 12 - GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master 12 + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 13 13 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 14 14 15 15 . ./test-lib.sh ··· 32 32 test_commit redundant-pick foo c redundant && 33 33 git commit --allow-empty --allow-empty-message && 34 34 git tag empty && 35 - git checkout master && 35 + git checkout main && 36 36 git config advice.detachedhead false 37 37 38 38 '
+20 -20
t/t3508-cherry-pick-many-commits.sh
··· 2 2 3 3 test_description='test cherry-picking many commits' 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 ' 35 35 36 36 test_expect_success 'cherry-pick first..fourth works' ' 37 - git checkout -f master && 37 + git checkout -f main && 38 38 git reset --hard first && 39 39 test_tick && 40 40 git cherry-pick first..fourth && ··· 48 48 test_commit one && 49 49 test_commit two && 50 50 test_commit three && 51 - git checkout -f master && 51 + git checkout -f main && 52 52 git reset --hard first && 53 53 git cherry-pick three one two && 54 54 git diff --quiet three && ··· 59 59 ' 60 60 61 61 test_expect_success 'cherry-pick three one two: fails' ' 62 - git checkout -f master && 62 + git checkout -f main && 63 63 git reset --hard first && 64 64 test_must_fail git cherry-pick three one two: 65 65 ' 66 66 67 67 test_expect_success 'output to keep user entertained during multi-pick' ' 68 68 cat <<-\EOF >expected && 69 - [master OBJID] second 69 + [main OBJID] second 70 70 Author: A U Thor <author@example.com> 71 71 Date: Thu Apr 7 15:14:13 2005 -0700 72 72 1 file changed, 1 insertion(+) 73 - [master OBJID] third 73 + [main OBJID] third 74 74 Author: A U Thor <author@example.com> 75 75 Date: Thu Apr 7 15:15:13 2005 -0700 76 76 1 file changed, 1 insertion(+) 77 - [master OBJID] fourth 77 + [main OBJID] fourth 78 78 Author: A U Thor <author@example.com> 79 79 Date: Thu Apr 7 15:16:13 2005 -0700 80 80 1 file changed, 1 insertion(+) 81 81 EOF 82 82 83 - git checkout -f master && 83 + git checkout -f main && 84 84 git reset --hard first && 85 85 test_tick && 86 86 git cherry-pick first..fourth >actual && ··· 90 90 ' 91 91 92 92 test_expect_success 'cherry-pick --strategy resolve first..fourth works' ' 93 - git checkout -f master && 93 + git checkout -f main && 94 94 git reset --hard first && 95 95 test_tick && 96 96 git cherry-pick --strategy resolve first..fourth && ··· 102 102 test_expect_success 'output during multi-pick indicates merge strategy' ' 103 103 cat <<-\EOF >expected && 104 104 Trying simple merge. 105 - [master OBJID] second 105 + [main OBJID] second 106 106 Author: A U Thor <author@example.com> 107 107 Date: Thu Apr 7 15:14:13 2005 -0700 108 108 1 file changed, 1 insertion(+) 109 109 Trying simple merge. 110 - [master OBJID] third 110 + [main OBJID] third 111 111 Author: A U Thor <author@example.com> 112 112 Date: Thu Apr 7 15:15:13 2005 -0700 113 113 1 file changed, 1 insertion(+) 114 114 Trying simple merge. 115 - [master OBJID] fourth 115 + [main OBJID] fourth 116 116 Author: A U Thor <author@example.com> 117 117 Date: Thu Apr 7 15:16:13 2005 -0700 118 118 1 file changed, 1 insertion(+) 119 119 EOF 120 120 121 - git checkout -f master && 121 + git checkout -f main && 122 122 git reset --hard first && 123 123 test_tick && 124 124 git cherry-pick --strategy resolve first..fourth >actual && ··· 127 127 ' 128 128 129 129 test_expect_success 'cherry-pick --ff first..fourth works' ' 130 - git checkout -f master && 130 + git checkout -f main && 131 131 git reset --hard first && 132 132 test_tick && 133 133 git cherry-pick --ff first..fourth && ··· 137 137 ' 138 138 139 139 test_expect_success 'cherry-pick -n first..fourth works' ' 140 - git checkout -f master && 140 + git checkout -f main && 141 141 git reset --hard first && 142 142 test_tick && 143 143 git cherry-pick -n first..fourth && ··· 147 147 ' 148 148 149 149 test_expect_success 'revert first..fourth works' ' 150 - git checkout -f master && 150 + git checkout -f main && 151 151 git reset --hard fourth && 152 152 test_tick && 153 153 git revert first..fourth && ··· 157 157 ' 158 158 159 159 test_expect_success 'revert ^first fourth works' ' 160 - git checkout -f master && 160 + git checkout -f main && 161 161 git reset --hard fourth && 162 162 test_tick && 163 163 git revert ^first fourth && ··· 167 167 ' 168 168 169 169 test_expect_success 'revert fourth fourth~1 fourth~2 works' ' 170 - git checkout -f master && 170 + git checkout -f main && 171 171 git reset --hard fourth && 172 172 test_tick && 173 173 git revert fourth fourth~1 fourth~2 && ··· 177 177 ' 178 178 179 179 test_expect_success 'cherry-pick -3 fourth works' ' 180 - git checkout -f master && 180 + git checkout -f main && 181 181 git reset --hard first && 182 182 test_tick && 183 183 git cherry-pick -3 fourth && ··· 187 187 ' 188 188 189 189 test_expect_success 'cherry-pick --stdin works' ' 190 - git checkout -f master && 190 + git checkout -f main && 191 191 git reset --hard first && 192 192 test_tick && 193 193 git rev-list --reverse first..fourth | git cherry-pick --stdin &&
+2 -2
t/t3509-cherry-pick-merge-df.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='Test cherry-pick with directory/file conflicts' 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 ··· 31 31 32 32 test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' ' 33 33 git reset --hard && 34 - git checkout master^0 && 34 + git checkout main^0 && 35 35 git cherry-pick branch 36 36 ' 37 37
+2 -2
t/t3512-cherry-pick-submodule.sh
··· 2 2 3 3 test_description='cherry-pick can handle submodules' 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 ··· 38 38 git add a_file && 39 39 git commit -m "modify a file" && 40 40 41 - git checkout master && 41 + git checkout main && 42 42 43 43 git submodule add ../sub sub && 44 44 git submodule update sub &&
+6 -6
t/t3600-rm.sh
··· 5 5 6 6 test_description='Test of the various options to git rm.' 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 ··· 486 486 echo 1 >nitfol && 487 487 git add nitfol && 488 488 git commit -m "added nitfol 1" && 489 - git checkout -b branch2 master && 489 + git checkout -b branch2 main && 490 490 echo 2 >nitfol && 491 491 git add nitfol && 492 492 git commit -m "added nitfol 2" && 493 - git checkout -b conflict1 master && 493 + git checkout -b conflict1 main && 494 494 git -C submod fetch && 495 495 git -C submod checkout branch1 && 496 496 git add submod && 497 497 git commit -m "submod 1" && 498 - git checkout -b conflict2 master && 498 + git checkout -b conflict2 main && 499 499 git -C submod checkout branch2 && 500 500 git add submod && 501 501 git commit -m "submod 2" ··· 607 607 ' 608 608 609 609 test_expect_success 'rm of a populated submodule with a .git directory migrates git dir' ' 610 - git checkout -f master && 610 + git checkout -f main && 611 611 git reset --hard && 612 612 git submodule update && 613 613 ( ··· 720 720 git checkout HEAD^ && 721 721 git submodule update && 722 722 git checkout -q HEAD^ && 723 - git checkout -q master 2>actual && 723 + git checkout -q main 2>actual && 724 724 test_i18ngrep "^warning: unable to rmdir '\''submod'\'':" actual && 725 725 git status -s submod >actual && 726 726 echo "?? submod/" >expected &&
+3 -3
t/t3701-add-interactive.sh
··· 1 1 #!/bin/sh 2 2 3 3 test_description='add -i basic tests' 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 ··· 552 552 test_commit non-conflict && 553 553 git checkout -b side && 554 554 test_commit side conflict.t && 555 - git checkout master && 556 - test_commit master conflict.t && 555 + git checkout main && 556 + test_commit main conflict.t && 557 557 test_must_fail git merge side && 558 558 echo changed >non-conflict.t && 559 559 echo y | git add -p >output &&
+21 -21
t/t3901-i18n-patch.sh
··· 5 5 6 6 test_description='i18n settings and format-patch | am pipe' 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 ··· 48 48 49 49 # the first commit on the side branch is UTF-8 50 50 test_tick && 51 - git checkout -b side master^ && 51 + git checkout -b side main^ && 52 52 echo Another file >yours && 53 53 git add yours && 54 54 git commit -s -m "Second on side" && ··· 72 72 test_expect_success 'format-patch output (ISO-8859-1)' ' 73 73 git config i18n.logoutputencoding ISO8859-1 && 74 74 75 - git format-patch --stdout master..HEAD^ >out-l1 && 75 + git format-patch --stdout main..HEAD^ >out-l1 && 76 76 git format-patch --stdout HEAD^ >out-l2 && 77 77 grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 && 78 78 grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 && ··· 83 83 test_expect_success 'format-patch output (UTF-8)' ' 84 84 git config i18n.logoutputencoding UTF-8 && 85 85 86 - git format-patch --stdout master..HEAD^ >out-u1 && 86 + git format-patch --stdout main..HEAD^ >out-u1 && 87 87 git format-patch --stdout HEAD^ >out-u2 && 88 88 grep "^Content-Type: text/plain; charset=UTF-8" out-u1 && 89 89 grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u1 && ··· 105 105 # we want UTF-8 encoded name. 106 106 . "$TEST_DIRECTORY"/t3901/utf8.txt && 107 107 git checkout -b test && 108 - git rebase master && 108 + git rebase main && 109 109 110 110 check_encoding 2 111 111 ' ··· 116 116 . "$TEST_DIRECTORY"/t3901/utf8.txt && 117 117 118 118 git reset --hard side && 119 - git rebase master && 119 + git rebase main && 120 120 121 121 check_encoding 2 122 122 ' ··· 128 128 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 129 129 130 130 git reset --hard side && 131 - git rebase master && 131 + git rebase main && 132 132 133 133 check_encoding 2 8859 134 134 ' ··· 141 141 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 142 142 143 143 git reset --hard side && 144 - git rebase master && 144 + git rebase main && 145 145 146 146 check_encoding 2 8859 147 147 ' ··· 153 153 git config i18n.logoutputencoding UTF-8 && 154 154 . "$TEST_DIRECTORY"/t3901/utf8.txt && 155 155 156 - git reset --hard master && 156 + git reset --hard main && 157 157 git cherry-pick side^ && 158 158 git cherry-pick side && 159 159 git revert HEAD && ··· 168 168 git config i18n.logoutputencoding ISO8859-1 && 169 169 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 170 170 171 - git reset --hard master && 171 + git reset --hard main && 172 172 git cherry-pick side^ && 173 173 git cherry-pick side && 174 174 git revert HEAD && ··· 183 183 git config i18n.logoutputencoding ISO8859-1 && 184 184 . "$TEST_DIRECTORY"/t3901/utf8.txt && 185 185 186 - git reset --hard master && 186 + git reset --hard main && 187 187 git cherry-pick side^ && 188 188 git cherry-pick side && 189 189 git revert HEAD && ··· 199 199 git config i18n.logoutputencoding UTF-8 && 200 200 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 201 201 202 - git reset --hard master && 202 + git reset --hard main && 203 203 git cherry-pick side^ && 204 204 git cherry-pick side && 205 205 git revert HEAD && ··· 213 213 . "$TEST_DIRECTORY"/t3901/utf8.txt && 214 214 215 215 git reset --hard side && 216 - git rebase --merge master && 216 + git rebase --merge main && 217 217 218 218 check_encoding 2 219 219 ' ··· 224 224 . "$TEST_DIRECTORY"/t3901/utf8.txt && 225 225 226 226 git reset --hard side && 227 - git rebase --merge master && 227 + git rebase --merge main && 228 228 229 229 check_encoding 2 230 230 ' ··· 236 236 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 237 237 238 238 git reset --hard side && 239 - git rebase --merge master && 239 + git rebase --merge main && 240 240 241 241 check_encoding 2 8859 242 242 ' ··· 249 249 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 250 250 251 251 git reset --hard side && 252 - git rebase --merge master && 252 + git rebase --merge main && 253 253 254 254 check_encoding 2 8859 255 255 ' ··· 259 259 git config i18n.commitencoding UTF-8 && 260 260 . "$TEST_DIRECTORY"/t3901/utf8.txt && 261 261 262 - git reset --hard master && 262 + git reset --hard main && 263 263 git am out-u1 out-u2 && 264 264 265 265 check_encoding 2 ··· 270 270 git config i18n.commitencoding ISO8859-1 && 271 271 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 272 272 273 - git reset --hard master && 273 + git reset --hard main && 274 274 git am out-l1 out-l2 && 275 275 276 276 check_encoding 2 8859 ··· 280 280 # Apply ISO-8859-1 patches with UTF-8 commitencoding 281 281 git config i18n.commitencoding UTF-8 && 282 282 . "$TEST_DIRECTORY"/t3901/utf8.txt && 283 - git reset --hard master && 283 + git reset --hard main && 284 284 285 285 # am specifies --utf8 by default. 286 286 git am out-l1 out-l2 && ··· 293 293 git config i18n.commitencoding UTF-8 && 294 294 . "$TEST_DIRECTORY"/t3901/utf8.txt && 295 295 296 - git reset --hard master && 296 + git reset --hard main && 297 297 git am --no-utf8 out-l1 out-l2 2>err && 298 298 299 299 # commit-tree will warn that the commit message does not contain valid UTF-8 ··· 308 308 git config i18n.commitencoding ISO8859-1 && 309 309 . "$TEST_DIRECTORY"/t3901/8859-1.txt && 310 310 311 - git reset --hard master && 311 + git reset --hard main && 312 312 # mailinfo will re-code the commit message to the charset specified by 313 313 # i18n.commitencoding 314 314 git am out-u1 out-u2 &&
+17 -17
t/t3903-stash.sh
··· 5 5 6 6 test_description='Test git stash' 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 ··· 223 223 git commit file -m second && 224 224 git stash branch stashbranch && 225 225 test refs/heads/stashbranch = $(git symbolic-ref HEAD) && 226 - test $(git rev-parse HEAD) = $(git rev-parse master^) && 226 + test $(git rev-parse HEAD) = $(git rev-parse main^) && 227 227 git diff --cached >output && 228 228 diff_cmp expect output && 229 229 git diff >output && 230 230 diff_cmp expect1 output && 231 231 git add file && 232 232 git commit -m alternate\ second && 233 - git diff master..stashbranch >output && 233 + git diff main..stashbranch >output && 234 234 diff_cmp output expect2 && 235 235 test 0 = $(git stash list | wc -l) 236 236 ' ··· 523 523 STASH_ID=$(git stash create) && 524 524 git reset --hard && 525 525 git stash branch stash-branch ${STASH_ID} && 526 - test_when_finished "git reset --hard HEAD && git checkout master && 526 + test_when_finished "git reset --hard HEAD && git checkout main && 527 527 git branch -D stash-branch" && 528 528 test $(git ls-files --modified | wc -l) -eq 1 529 529 ' ··· 539 539 STASH_ID=$(git stash create) && 540 540 git reset --hard && 541 541 git stash branch stash-branch ${STASH_ID} && 542 - test_when_finished "git reset --hard HEAD && git checkout master && 542 + test_when_finished "git reset --hard HEAD && git checkout main && 543 543 git branch -D stash-branch" && 544 544 test $(git ls-files --modified | wc -l) -eq 1 545 545 ' ··· 741 741 git stash && 742 742 git stash show 0 && 743 743 git stash branch tmp 0 && 744 - git checkout master && 744 + git checkout main && 745 745 git stash && 746 746 git stash apply 0 && 747 747 git reset --hard && ··· 758 758 git commit -m initial && 759 759 echo bar >file && 760 760 git stash && 761 - test_must_fail git stash branch master stash@{0} && 761 + test_must_fail git stash branch main stash@{0} && 762 762 git rev-parse stash@{0} -- 763 763 ' 764 764 ··· 771 771 echo bar >file && 772 772 git stash && 773 773 echo baz >file && 774 - test_when_finished "git checkout master" && 774 + test_when_finished "git checkout main" && 775 775 test_must_fail git stash branch new_branch stash@{0} && 776 776 git rev-parse stash@{0} -- 777 777 ' ··· 905 905 >foo && 906 906 git add foo && 907 907 git stash push -m "test message" && 908 - echo "stash@{0}: On master: test message" >expect && 908 + echo "stash@{0}: On main: test message" >expect && 909 909 git stash list -1 >actual && 910 910 test_cmp expect actual 911 911 ' ··· 914 914 >foo && 915 915 git add foo && 916 916 git stash push -m"unspaced test message" && 917 - echo "stash@{0}: On master: unspaced test message" >expect && 917 + echo "stash@{0}: On main: unspaced test message" >expect && 918 918 git stash list -1 >actual && 919 919 test_cmp expect actual 920 920 ' ··· 971 971 >foo && 972 972 git add foo && 973 973 git stash push -m"test mfoo" && 974 - echo "stash@{0}: On master: test mfoo" >expect && 974 + echo "stash@{0}: On main: test mfoo" >expect && 975 975 git stash list -1 >actual && 976 976 test_cmp expect actual 977 977 ' ··· 980 980 >foo && 981 981 git add foo && 982 982 git stash push --message "test message foo" && 983 - echo "stash@{0}: On master: test message foo" >expect && 983 + echo "stash@{0}: On main: test message foo" >expect && 984 984 git stash list -1 >actual && 985 985 test_cmp expect actual 986 986 ' ··· 989 989 >foo && 990 990 git add foo && 991 991 git stash push --message="test message=foo" && 992 - echo "stash@{0}: On master: test message=foo" >expect && 992 + echo "stash@{0}: On main: test message=foo" >expect && 993 993 git stash list -1 >actual && 994 994 test_cmp expect actual 995 995 ' ··· 998 998 >foo && 999 999 git add foo && 1000 1000 git stash push -m "test m foo" && 1001 - echo "stash@{0}: On master: test m foo" >expect && 1001 + echo "stash@{0}: On main: test m foo" >expect && 1002 1002 git stash list -1 >actual && 1003 1003 test_cmp expect actual 1004 1004 ' ··· 1007 1007 >foo && 1008 1008 git add foo && 1009 1009 STASH_ID=$(git stash create "create test message") && 1010 - echo "On master: create test message" >expect && 1010 + echo "On main: create test message" >expect && 1011 1011 git show --pretty=%s -s ${STASH_ID} >actual && 1012 1012 test_cmp expect actual 1013 1013 ' ··· 1016 1016 >foo && 1017 1017 git add foo && 1018 1018 STASH_ID=$(git stash create test untracked) && 1019 - echo "On master: test untracked" >expect && 1019 + echo "On main: test untracked" >expect && 1020 1020 git show --pretty=%s -s ${STASH_ID} >actual && 1021 1021 test_cmp expect actual 1022 1022 ' 1023 1023 1024 1024 test_expect_success 'create in a detached state' ' 1025 - test_when_finished "git checkout master" && 1025 + test_when_finished "git checkout main" && 1026 1026 git checkout HEAD~1 && 1027 1027 >foo && 1028 1028 git add foo &&
+4 -4
t/t3910-mac-os-precompose.sh
··· 5 5 6 6 test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)' 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 ··· 154 154 git checkout l.$Odiarnfd 155 155 ' 156 156 test_expect_success "setup case mac2" ' 157 - git checkout master && 157 + git checkout main && 158 158 git reset --hard && 159 159 git checkout -b mac_os_2 160 160 ' ··· 166 166 git commit -m "add d2.$Adiarnfd/f.$Adiarnfd" -- d2.$Adiarnfd/f.$Adiarnfd 167 167 ' 168 168 test_expect_success "setup for long decomposed filename" ' 169 - git checkout master && 169 + git checkout main && 170 170 git reset --hard && 171 171 git checkout -b mac_os_long_nfd_fn 172 172 ' ··· 176 176 git commit -m "Long filename" 177 177 ' 178 178 test_expect_success "setup for long precomposed filename" ' 179 - git checkout master && 179 + git checkout main && 180 180 git reset --hard && 181 181 git checkout -b mac_os_long_nfc_fn 182 182 '