summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:21 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-19 15:44:18 -0800
commit06d531486e9078c88c324ad6f87376cfa897f058 (patch)
treec3ed8ffad4583e9bd1e717c782dc8b20784f2d91 /t
parentt0060: preemptively adjust alignment (diff)
downloadtgif-06d531486e9078c88c324ad6f87376cfa897f058.tar.xz
t[01]*: adjust the references to the default branch name "main"
Carefully excluding t1309, which sees independent development elsewhere at the time of writing, we transition above-mentioned tests 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' -e 's/naster/nain/g' -- t[01]*.sh && git checkout HEAD -- t1309\*) Note that t5533 contains a variation of the name `master` (`naster`) that we rename here, too. This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0002-gitfile.sh8
-rwxr-xr-xt/t0020-crlf.sh10
-rwxr-xr-xt/t0021-conversion.sh42
-rwxr-xr-xt/t0027-auto-crlf.sh4
-rwxr-xr-xt/t0028-working-tree-encoding.sh6
-rwxr-xr-xt/t0041-usage.sh12
-rwxr-xr-xt/t0050-filesystem.sh8
-rwxr-xr-xt/t0060-path-utils.sh4
-rwxr-xr-xt/t0100-previous.sh20
-rwxr-xr-xt/t1004-read-tree-m-u-wf.sh42
-rwxr-xr-xt/t1008-read-tree-overlay.sh4
-rwxr-xr-xt/t1009-read-tree-new-index.sh6
-rwxr-xr-xt/t1011-read-tree-sparse-checkout.sh2
-rwxr-xr-xt/t1021-rerere-in-workdir.sh4
-rwxr-xr-xt/t1090-sparse-checkout-scope.sh12
-rwxr-xr-xt/t1091-sparse-checkout-builtin.sh4
-rwxr-xr-xt/t1300-config.sh10
-rwxr-xr-xt/t1301-shared-repo.sh6
-rwxr-xr-xt/t1305-config-include.sh2
-rwxr-xr-xt/t1400-update-ref.sh70
-rwxr-xr-xt/t1402-check-ref-format.sh32
-rwxr-xr-xt/t1403-show-ref.sh20
-rwxr-xr-xt/t1405-main-ref-store.sh44
-rwxr-xr-xt/t1406-submodule-ref-store.sh32
-rwxr-xr-xt/t1407-worktree-ref-store.sh34
-rwxr-xr-xt/t1408-packed-refs.sh14
-rwxr-xr-xt/t1410-reflog.sh58
-rwxr-xr-xt/t1411-reflog-show.sh4
-rwxr-xr-xt/t1413-reflog-detach.sh26
-rwxr-xr-xt/t1414-reflog-walk.sh14
-rwxr-xr-xt/t1416-ref-transaction-hooks.sh12
-rwxr-xr-xt/t1430-bad-ref-name.sh54
-rwxr-xr-xt/t1450-fsck.sh2
-rwxr-xr-xt/t1500-rev-parse.sh6
-rwxr-xr-xt/t1503-rev-parse-verify.sh30
-rwxr-xr-xt/t1505-rev-parse-last.sh10
-rwxr-xr-xt/t1506-rev-parse-diagnosis.sh6
-rwxr-xr-xt/t1507-rev-parse-upstream.sh42
-rwxr-xr-xt/t1508-at-combinations.sh12
-rwxr-xr-xt/t1511-rev-parse-caret.sh28
-rwxr-xr-xt/t1512-rev-parse-disambiguation.sh4
-rwxr-xr-xt/t1513-rev-parse-prefix.sh6
-rwxr-xr-xt/t1514-rev-parse-push.sh18
-rwxr-xr-xt/t1700-split-index.sh4
44 files changed, 394 insertions, 394 deletions
diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
index 0a396c95e5..8440e6add1 100755
--- a/t/t0002-gitfile.sh
+++ b/t/t0002-gitfile.sh
@@ -4,7 +4,7 @@ test_description='.git file
Verify that plumbing commands work when .git is a file
'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -99,7 +99,7 @@ test_expect_success 'enter_repo non-strict mode' '
git ls-remote enter_repo >actual &&
cat >expected <<-EOF &&
$head HEAD
- $head refs/heads/master
+ $head refs/heads/main
$head refs/tags/foo
EOF
test_cmp expected actual
@@ -114,7 +114,7 @@ test_expect_success 'enter_repo linked checkout' '
git ls-remote foo >actual &&
cat >expected <<-EOF &&
$head HEAD
- $head refs/heads/master
+ $head refs/heads/main
$head refs/tags/foo
EOF
test_cmp expected actual
@@ -125,7 +125,7 @@ test_expect_success 'enter_repo strict mode' '
git ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&
cat >expected <<-EOF &&
$head HEAD
- $head refs/heads/master
+ $head refs/heads/main
$head refs/tags/foo
EOF
test_cmp expected actual
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 0d43189048..375cf94398 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -2,7 +2,7 @@
test_description='CRLF conversion'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -321,8 +321,8 @@ test_expect_success 'checkout with existing .gitattributes' '
git add .gitattributes .file &&
git commit -m second &&
- git checkout master~1 &&
- git checkout master &&
+ git checkout main~1 &&
+ git checkout main &&
test "$(git diff-files --raw)" = ""
'
@@ -334,8 +334,8 @@ test_expect_success 'checkout when deleting .gitattributes' '
git add .file2 &&
git commit -m third &&
- git checkout master~1 &&
- git checkout master &&
+ git checkout main~1 &&
+ git checkout main &&
has_cr .file2
'
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index adf862aef1..e4c4de5c74 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -2,7 +2,7 @@
test_description='blob conversion via gitattributes'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -381,8 +381,8 @@ test_expect_success PERL 'required process filter should filter data' '
test_cmp_count expected.log debug.log &&
git commit -m "test commit 2" &&
- MASTER=$(git rev-parse --verify master) &&
- META="ref=refs/heads/master treeish=$MASTER" &&
+ MAIN=$(git rev-parse --verify main) &&
+ META="ref=refs/heads/main treeish=$MAIN" &&
rm -f test2.r "testsubdir/test3 '\''sq'\'',\$x=.r" &&
filter_git checkout --quiet --no-progress . &&
@@ -407,7 +407,7 @@ test_expect_success PERL 'required process filter should filter data' '
EOF
test_cmp_exclude_clean expected.log debug.log &&
- filter_git checkout --quiet --no-progress master &&
+ filter_git checkout --quiet --no-progress main &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -439,15 +439,15 @@ test_expect_success PERL 'required process filter should filter data for various
M3=$(git hash-object "testsubdir/test3 '\''sq'\'',\$x=.r") &&
EMPTY=$(git hash-object /dev/null) &&
- MASTER=$(git rev-parse --verify master) &&
+ MAIN=$(git rev-parse --verify main) &&
cp "$TEST_ROOT/test.o" test5.r &&
git add test5.r &&
git commit -m "test commit 3" &&
git checkout empty-branch &&
- filter_git rebase --onto empty-branch master^^ master &&
- MASTER2=$(git rev-parse --verify master) &&
- META="ref=refs/heads/master treeish=$MASTER2" &&
+ filter_git rebase --onto empty-branch main^^ main &&
+ MAIN2=$(git rev-parse --verify main) &&
+ META="ref=refs/heads/main treeish=$MAIN2" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -461,8 +461,8 @@ test_expect_success PERL 'required process filter should filter data for various
test_cmp_exclude_clean expected.log debug.log &&
git reset --hard empty-branch &&
- filter_git reset --hard $MASTER &&
- META="treeish=$MASTER" &&
+ filter_git reset --hard $MAIN &&
+ META="treeish=$MAIN" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -474,10 +474,10 @@ test_expect_success PERL 'required process filter should filter data for various
EOF
test_cmp_exclude_clean expected.log debug.log &&
- git branch old-master $MASTER &&
+ git branch old-main $MAIN &&
git reset --hard empty-branch &&
- filter_git reset --hard old-master &&
- META="ref=refs/heads/old-master treeish=$MASTER" &&
+ filter_git reset --hard old-main &&
+ META="ref=refs/heads/old-main treeish=$MAIN" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -490,9 +490,9 @@ test_expect_success PERL 'required process filter should filter data for various
test_cmp_exclude_clean expected.log debug.log &&
git checkout -b merge empty-branch &&
- git branch -f master $MASTER2 &&
- filter_git merge master &&
- META="treeish=$MASTER2" &&
+ git branch -f main $MAIN2 &&
+ filter_git merge main &&
+ META="treeish=$MAIN2" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -505,8 +505,8 @@ test_expect_success PERL 'required process filter should filter data for various
EOF
test_cmp_exclude_clean expected.log debug.log &&
- filter_git archive master >/dev/null &&
- META="ref=refs/heads/master treeish=$MASTER2" &&
+ filter_git archive main >/dev/null &&
+ META="ref=refs/heads/main treeish=$MAIN2" &&
cat >expected.log <<-EOF &&
START
init handshake complete
@@ -519,7 +519,7 @@ test_expect_success PERL 'required process filter should filter data for various
EOF
test_cmp_exclude_clean expected.log debug.log &&
- TREE="$(git rev-parse $MASTER2^{tree})" &&
+ TREE="$(git rev-parse $MAIN2^{tree})" &&
filter_git archive $TREE >/dev/null &&
META="treeish=$TREE" &&
cat >expected.log <<-EOF &&
@@ -859,8 +859,8 @@ test_expect_success PERL 'delayed checkout in process filter' '
) &&
S=$(test_file_size "$TEST_ROOT/test.o") &&
- PM="ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) " &&
- M="${PM}blob=$(git -C repo rev-parse --verify master:test.a)" &&
+ PM="ref=refs/heads/main treeish=$(git -C repo rev-parse --verify main) " &&
+ M="${PM}blob=$(git -C repo rev-parse --verify main:test.a)" &&
cat >a.exp <<-EOF &&
START
init handshake complete
diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
index 9fcd56fab3..51f74a3ddf 100755
--- a/t/t0027-auto-crlf.sh
+++ b/t/t0027-auto-crlf.sh
@@ -368,9 +368,9 @@ test_expect_success 'ls-files --eol -o Text/Binary' '
test_cmp expect actual
'
-test_expect_success 'setup master' '
+test_expect_success 'setup main' '
echo >.gitattributes &&
- git checkout -b master &&
+ git checkout -b main &&
git add .gitattributes &&
git commit -m "add .gitattributes" . &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\nLINETWO\nLINETHREE" >LF &&
diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh
index ccdc91c41c..f970a9806b 100755
--- a/t/t0028-working-tree-encoding.sh
+++ b/t/t0028-working-tree-encoding.sh
@@ -2,7 +2,7 @@
test_description='working-tree-encoding conversion via gitattributes'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -218,7 +218,7 @@ test_expect_success 'error if encoding round trip is not the same during refresh
TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&
git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&
COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
- git update-ref refs/heads/master $COMMIT &&
+ git update-ref refs/heads/main $COMMIT &&
test_must_fail git checkout HEAD^ 2>err.out &&
test_i18ngrep "error: .* overwritten by checkout:" err.out
@@ -234,7 +234,7 @@ test_expect_success 'error if encoding garbage is already in Git' '
TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&
git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&
COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
- git update-ref refs/heads/master $COMMIT &&
+ git update-ref refs/heads/main $COMMIT &&
git diff 2>err.out &&
test_i18ngrep "error: BOM is required" err.out
diff --git a/t/t0041-usage.sh b/t/t0041-usage.sh
index 068b784e72..c4fc34eb18 100755
--- a/t/t0041-usage.sh
+++ b/t/t0041-usage.sh
@@ -2,7 +2,7 @@
test_description='Test commands behavior when given invalid argument value'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -44,8 +44,8 @@ test_expect_success 'tag usage error' '
'
test_expect_success 'branch --contains <existent_commit>' '
- git branch --contains "master" >actual 2>actual.err &&
- test_i18ngrep "master" actual &&
+ git branch --contains "main" >actual 2>actual.err &&
+ test_i18ngrep "main" actual &&
test_line_count = 0 actual.err
'
@@ -57,7 +57,7 @@ test_expect_success 'branch --contains <inexistent_commit>' '
'
test_expect_success 'branch --no-contains <existent_commit>' '
- git branch --no-contains "master" >actual 2>actual.err &&
+ git branch --no-contains "main" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
@@ -76,7 +76,7 @@ test_expect_success 'branch usage error' '
'
test_expect_success 'for-each-ref --contains <existent_object>' '
- git for-each-ref --contains "master" >actual 2>actual.err &&
+ git for-each-ref --contains "main" >actual 2>actual.err &&
test_line_count = 2 actual &&
test_line_count = 0 actual.err
'
@@ -89,7 +89,7 @@ test_expect_success 'for-each-ref --contains <inexistent_object>' '
'
test_expect_success 'for-each-ref --no-contains <existent_object>' '
- git for-each-ref --no-contains "master" >actual 2>actual.err &&
+ git for-each-ref --no-contains "main" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 368f7d515b..afc343cf9b 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -2,7 +2,7 @@
test_description='Various filesystem issues'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -68,7 +68,7 @@ test_expect_success "setup case tests" '
git mv camelcase tmp &&
git mv tmp CamelCase &&
git commit -m "rename" &&
- git checkout -f master
+ git checkout -f main
'
test_expect_success 'rename (case change)' '
@@ -121,7 +121,7 @@ test_expect_success "setup unicode normalization tests" '
git mv $aumlcdiar tmp &&
git mv tmp "$auml" &&
git commit -m rename &&
- git checkout -f master
+ git checkout -f main
'
$test_unicode 'rename (silent unicode normalization)' '
@@ -150,7 +150,7 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in
git add gitweb &&
git commit -m "add gitweb/subdir/file" &&
- git checkout master
+ git checkout main
)
'
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 49cd48c3f3..0ff06b5d1b 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -312,8 +312,8 @@ test_git_path GIT_COMMON_DIR=bar info/sparse-checkout .git/info/sparse-check
test_git_path GIT_COMMON_DIR=bar info//sparse-checkout .git/info//sparse-checkout
test_git_path GIT_COMMON_DIR=bar remotes/bar bar/remotes/bar
test_git_path GIT_COMMON_DIR=bar branches/bar bar/branches/bar
-test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master bar/logs/refs/heads/master
-test_git_path GIT_COMMON_DIR=bar refs/heads/master bar/refs/heads/master
+test_git_path GIT_COMMON_DIR=bar logs/refs/heads/main bar/logs/refs/heads/main
+test_git_path GIT_COMMON_DIR=bar refs/heads/main bar/refs/heads/main
test_git_path GIT_COMMON_DIR=bar refs/bisect/foo .git/refs/bisect/foo
test_git_path GIT_COMMON_DIR=bar hooks/me bar/hooks/me
test_git_path GIT_COMMON_DIR=bar config bar/config
diff --git a/t/t0100-previous.sh b/t/t0100-previous.sh
index c3c2770ab3..69beb59f62 100755
--- a/t/t0100-previous.sh
+++ b/t/t0100-previous.sh
@@ -2,7 +2,7 @@
test_description='previous branch syntax @{-n}'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -11,7 +11,7 @@ test_expect_success 'branch -d @{-1}' '
test_commit A &&
git checkout -b junk &&
git checkout - &&
- test "$(git symbolic-ref HEAD)" = refs/heads/master &&
+ test "$(git symbolic-ref HEAD)" = refs/heads/main &&
git branch -d @{-1} &&
test_must_fail git rev-parse --verify refs/heads/junk
'
@@ -20,9 +20,9 @@ test_expect_success 'branch -d @{-12} when there is not enough switches yet' '
git reflog expire --expire=now &&
git checkout -b junk2 &&
git checkout - &&
- test "$(git symbolic-ref HEAD)" = refs/heads/master &&
+ test "$(git symbolic-ref HEAD)" = refs/heads/main &&
test_must_fail git branch -d @{-12} &&
- git rev-parse --verify refs/heads/master
+ git rev-parse --verify refs/heads/main
'
test_expect_success 'merge @{-1}' '
@@ -31,19 +31,19 @@ test_expect_success 'merge @{-1}' '
git checkout A &&
test_commit C &&
test_commit D &&
- git branch -f master B &&
+ git branch -f main B &&
git branch -f other &&
git checkout other &&
- git checkout master &&
+ git checkout main &&
git merge @{-1} &&
git cat-file commit HEAD | grep "Merge branch '\''other'\''"
'
test_expect_success 'merge @{-1}~1' '
- git checkout master &&
+ git checkout main &&
git reset --hard B &&
git checkout other &&
- git checkout master &&
+ git checkout main &&
git merge @{-1}~1 &&
git cat-file commit HEAD >actual &&
grep "Merge branch '\''other'\''" actual
@@ -51,11 +51,11 @@ test_expect_success 'merge @{-1}~1' '
test_expect_success 'merge @{-100} before checking out that many branches yet' '
git reflog expire --expire=now &&
- git checkout -f master &&
+ git checkout -f main &&
git reset --hard B &&
git branch -f other C &&
git checkout other &&
- git checkout master &&
+ git checkout main &&
test_must_fail git merge @{-100}
'
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index 57caa3a73f..11bf10424f 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -2,7 +2,7 @@
test_description='read-tree -m -u checks working tree files'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -23,17 +23,17 @@ test_expect_success 'two-way setup' '
git branch side &&
git tag -f branch-point &&
- echo file2 is not tracked on the master branch anymore &&
+ echo file2 is not tracked on the main branch anymore &&
rm -f file2 subdir/file2 &&
git update-index --remove file2 subdir/file2 &&
- git commit -a -m "master removes file2 and subdir/file2"
+ git commit -a -m "main removes file2 and subdir/file2"
'
test_expect_success 'two-way not clobbering' '
- echo >file2 master creates untracked file2 &&
- echo >subdir/file2 master creates untracked subdir/file2 &&
- if err=$(read_tree_u_must_succeed -m -u master side 2>&1)
+ echo >file2 main creates untracked file2 &&
+ echo >subdir/file2 main creates untracked subdir/file2 &&
+ if err=$(read_tree_u_must_succeed -m -u main side 2>&1)
then
echo should have complained
false
@@ -46,7 +46,7 @@ echo file2 >.gitignore
test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '
- if err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)
+ if err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore main side 2>&1)
then
echo should have complained
false
@@ -57,7 +57,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (1)' '
test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '
- if err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)
+ if err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore main side 2>&1)
then
echo should have complained
false
@@ -68,7 +68,7 @@ test_expect_success 'two-way with incorrect --exclude-per-directory (2)' '
test_expect_success 'two-way clobbering a ignored file' '
- read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore master side
+ read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore main side
'
rm -f .gitignore
@@ -84,21 +84,21 @@ test_expect_success 'three-way not complaining on an untracked path in both' '
git update-index --add file3 subdir/file3 &&
git commit -a -m "side adds file3 and removes file2" &&
- git checkout master &&
- echo >file2 file two is untracked on the master side &&
- echo >subdir/file2 file two is untracked on the master side &&
+ git checkout main &&
+ echo >file2 file two is untracked on the main side &&
+ echo >subdir/file2 file two is untracked on the main side &&
- read_tree_u_must_succeed -m -u branch-point master side
+ read_tree_u_must_succeed -m -u branch-point main side
'
test_expect_success 'three-way not clobbering a working tree file' '
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
- git checkout master &&
- echo >file3 file three created in master, untracked &&
- echo >subdir/file3 file three created in master, untracked &&
- if err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)
+ git checkout main &&
+ echo >file3 file three created in main, untracked &&
+ echo >subdir/file3 file three created in main, untracked &&
+ if err=$(read_tree_u_must_succeed -m -u branch-point main side 2>&1)
then
echo should have complained
false
@@ -113,11 +113,11 @@ test_expect_success 'three-way not complaining on an untracked file' '
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
- git checkout master &&
- echo >file3 file three created in master, untracked &&
- echo >subdir/file3 file three created in master, untracked &&
+ git checkout main &&
+ echo >file3 file three created in main, untracked &&
+ echo >subdir/file3 file three created in main, untracked &&
- read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point master side
+ read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point main side
'
test_expect_success '3-way not overwriting local changes (setup)' '
diff --git a/t/t1008-read-tree-overlay.sh b/t/t1008-read-tree-overlay.sh
index edb89447c7..4512fb0b6e 100755
--- a/t/t1008-read-tree-overlay.sh
+++ b/t/t1008-read-tree-overlay.sh
@@ -2,7 +2,7 @@
test_description='test multi-tree read-tree without merging'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -25,7 +25,7 @@ test_expect_success setup '
'
test_expect_success 'multi-read' '
- read_tree_must_succeed initial master side &&
+ read_tree_must_succeed initial main side &&
test_write_lines a b/c >expect &&
git ls-files >actual &&
test_cmp expect actual
diff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh
index b9bab37ac0..2935f68f8d 100755
--- a/t/t1009-read-tree-new-index.sh
+++ b/t/t1009-read-tree-new-index.sh
@@ -2,7 +2,7 @@
test_description='test read-tree into a fresh index file'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -15,13 +15,13 @@ test_expect_success setup '
test_expect_success 'non-existent index file' '
rm -f new-index &&
- GIT_INDEX_FILE=new-index git read-tree master
+ GIT_INDEX_FILE=new-index git read-tree main
'
test_expect_success 'empty index file' '
rm -f new-index &&
> new-index &&
- GIT_INDEX_FILE=new-index git read-tree master
+ GIT_INDEX_FILE=new-index git read-tree main
'
test_done
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index 140f459977..dfe9794a74 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -2,7 +2,7 @@
test_description='sparse checkout tests
-* (tag: removed, master) removed
+* (tag: removed, main) removed
| D sub/added
* (HEAD, tag: top) modified and added
| M init.t
diff --git a/t/t1021-rerere-in-workdir.sh b/t/t1021-rerere-in-workdir.sh
index 9177871c99..0b892894eb 100755
--- a/t/t1021-rerere-in-workdir.sh
+++ b/t/t1021-rerere-in-workdir.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='rerere run in a workdir'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -22,7 +22,7 @@ test_expect_success SYMLINKS setup '
test_tick &&
git commit -a -m goodbye &&
- git checkout master
+ git checkout main
'
test_expect_success SYMLINKS 'rerere in workdir' '
diff --git a/t/t1090-sparse-checkout-scope.sh b/t/t1090-sparse-checkout-scope.sh
index d731322633..3deb490187 100755
--- a/t/t1090-sparse-checkout-scope.sh
+++ b/t/t1090-sparse-checkout-scope.sh
@@