summaryrefslogtreecommitdiff
path: root/t/t7060-wtstatus.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit01dc81336dc10c8f2350454c755a8a0ab676a9c9 (patch)
tree74230ac15a70592c4178ba53ceef337f5730dd2d /t/t7060-wtstatus.sh
parent5902f5f4608c1857fc04dcae2a0ce6beea31c8f8 (diff)
downloadgit-01dc81336dc10c8f2350454c755a8a0ab676a9c9.zip
git-01dc81336dc10c8f2350454c755a8a0ab676a9c9.tar.gz
git-01dc81336dc10c8f2350454c755a8a0ab676a9c9.tar.bz2
t7[0-4]*: adjust the references to the default branch name "main"
Carefully excluding t7064, which sees independent development elsewhere at the time of writing, we use `main` as the default branch name in t7[0-4]*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t7[0-4]*.sh && git checkout HEAD -- t7064\*) 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>
Diffstat (limited to 't/t7060-wtstatus.sh')
-rwxr-xr-xt/t7060-wtstatus.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
index e65ca01..72fb418 100755
--- a/t/t7060-wtstatus.sh
+++ b/t/t7060-wtstatus.sh
@@ -2,7 +2,7 @@
test_description='basic work tree status reporting'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -54,7 +54,7 @@ EOF
git checkout -b side HEAD^ &&
git rm foo &&
git commit -m delete &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
test_must_fail git commit --dry-run >../actual &&
test_i18ncmp ../expect ../actual &&
git status >../actual &&
@@ -127,18 +127,18 @@ test_expect_success 'git diff-index --cached -C shows 2 copies + 1 unmerged' '
test_expect_success 'status when conflicts with add and rm advice (deleted by them)' '
git reset --hard &&
- git checkout master &&
+ git checkout main &&
test_commit init main.txt init &&
git checkout -b second_branch &&
git rm main.txt &&
git commit -m "main.txt deleted on second_branch" &&
test_commit second conflict.txt second &&
- git checkout master &&
+ git checkout main &&
test_commit on_second main.txt on_second &&
- test_commit master conflict.txt master &&
+ test_commit main conflict.txt main &&
test_must_fail git merge second_branch &&
cat >expected <<\EOF &&
-On branch master
+On branch main
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
@@ -160,8 +160,8 @@ test_expect_success 'prepare for conflicts' '
git checkout -b conflict &&
test_commit one main.txt one &&
git branch conflict_second &&
- git mv main.txt sub_master.txt &&
- git commit -m "main.txt renamed in sub_master.txt" &&
+ git mv main.txt sub_main.txt &&
+ git commit -m "main.txt renamed in sub_main.txt" &&
git checkout conflict_second &&
git mv main.txt sub_second.txt &&
git commit -m "main.txt renamed in sub_second.txt"
@@ -179,7 +179,7 @@ You have unmerged paths.
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
both deleted: main.txt
- added by them: sub_master.txt
+ added by them: sub_main.txt
added by us: sub_second.txt
no changes added to commit (use "git add" and/or "git commit -a")
@@ -192,7 +192,7 @@ EOF
test_expect_success 'status when conflicts with only rm advice (both deleted)' '
git reset --hard conflict_second &&
test_must_fail git merge conflict &&
- git add sub_master.txt &&
+ git add sub_main.txt &&
git add sub_second.txt &&
cat >expected <<\EOF &&
On branch conflict_second
@@ -201,7 +201,7 @@ You have unmerged paths.
(use "git merge --abort" to abort the merge)
Changes to be committed:
- new file: sub_master.txt
+ new file: sub_main.txt
Unmerged paths:
(use "git rm <file>..." to mark resolution)
@@ -212,12 +212,12 @@ EOF
git status --untracked-files=no >actual &&
test_i18ncmp expected actual &&
git reset --hard &&
- git checkout master
+ git checkout main
'
test_expect_success 'status --branch with detached HEAD' '
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
git status --branch --porcelain >actual &&
cat >expected <<-EOF &&
## HEAD (no branch)
@@ -233,7 +233,7 @@ test_expect_success 'status --branch with detached HEAD' '
## Duplicate the above test and verify --porcelain=v1 arg parsing.
test_expect_success 'status --porcelain=v1 --branch with detached HEAD' '
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
git status --branch --porcelain=v1 >actual &&
cat >expected <<-EOF &&
## HEAD (no branch)