summaryrefslogtreecommitdiff
path: root/t/t1004-read-tree-m-u-wf.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit06d531486e9078c88c324ad6f87376cfa897f058 (patch)
treec3ed8ffad4583e9bd1e717c782dc8b20784f2d91 /t/t1004-read-tree-m-u-wf.sh
parentc2fdc8820c306c257a8ff11af3d18e3269a81213 (diff)
downloadgit-06d531486e9078c88c324ad6f87376cfa897f058.zip
git-06d531486e9078c88c324ad6f87376cfa897f058.tar.gz
git-06d531486e9078c88c324ad6f87376cfa897f058.tar.bz2
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/t1004-read-tree-m-u-wf.sh')
-rwxr-xr-xt/t1004-read-tree-m-u-wf.sh42
1 files changed, 21 insertions, 21 deletions
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index 57caa3a..11bf104 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)' '