summaryrefslogtreecommitdiff
path: root/t/t7512-status-help.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-19 23:44:18 (GMT)
commit1e2ae142c06f7648a646278947bbcb61173f37eb (patch)
treee1050696a0fb5f407ac538f1c944e78d420da791 /t/t7512-status-help.sh
parent01dc81336dc10c8f2350454c755a8a0ab676a9c9 (diff)
downloadgit-1e2ae142c06f7648a646278947bbcb61173f37eb.zip
git-1e2ae142c06f7648a646278947bbcb61173f37eb.tar.gz
git-1e2ae142c06f7648a646278947bbcb61173f37eb.tar.bz2
t7[5-9]*: adjust the references to the default branch name "main"
Excluding t7817, which is added in an unrelated patch series at the time of writing, this adjusts t7[5-9]*. 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[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>
Diffstat (limited to 't/t7512-status-help.sh')
-rwxr-xr-xt/t7512-status-help.sh42
1 files changed, 21 insertions, 21 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
index fbd760f..9f5e3ce 100755
--- a/t/t7512-status-help.sh
+++ b/t/t7512-status-help.sh
@@ -7,7 +7,7 @@
test_description='git status advice'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -20,14 +20,14 @@ test_expect_success 'prepare for conflicts' '
git config --global advice.statusuoption false &&
test_commit init main.txt init &&
git branch conflicts &&
- test_commit on_master main.txt on_master &&
+ test_commit on_main main.txt on_main &&
git checkout conflicts &&
test_commit on_conflicts main.txt on_conflicts
'
test_expect_success 'status when conflicts unresolved' '
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
cat >expected <<\EOF &&
On branch conflicts
You have unmerged paths.
@@ -47,7 +47,7 @@ EOF
test_expect_success 'status when conflicts resolved before commit' '
git reset --hard conflicts &&
- test_must_fail git merge master &&
+ test_must_fail git merge main &&
echo one >main.txt &&
git add main.txt &&
cat >expected <<\EOF &&
@@ -66,7 +66,7 @@ EOF
test_expect_success 'prepare for rebase conflicts' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b rebase_conflicts &&
test_commit one_rebase main.txt one &&
test_commit two_rebase main.txt two &&
@@ -121,11 +121,11 @@ EOF
test_expect_success 'prepare for rebase_i_conflicts' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b rebase_i_conflicts &&
test_commit one_unmerge main.txt one_unmerge &&
git branch rebase_i_conflicts_second &&
- test_commit one_master main.txt one_master &&
+ test_commit one_main main.txt one_main &&
git checkout rebase_i_conflicts_second &&
test_commit one_second main.txt one_second
'
@@ -185,7 +185,7 @@ EOF
test_expect_success 'status when rebasing -i in edit mode' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b rebase_i_edit &&
test_commit one_rebase_i main.txt one &&
test_commit two_rebase_i main.txt two &&
@@ -215,7 +215,7 @@ EOF
test_expect_success 'status when splitting a commit' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b split_commit &&
test_commit one_split main.txt one &&
test_commit two_split main.txt two &&
@@ -254,7 +254,7 @@ EOF
test_expect_success 'status after editing the last commit with --amend during a rebase -i' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b amend_last &&
test_commit one_amend main.txt one &&
test_commit two_amend main.txt two &&
@@ -287,7 +287,7 @@ EOF
test_expect_success 'prepare for several edits' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b several_edits &&
test_commit one_edits main.txt one &&
test_commit two_edits main.txt two &&
@@ -596,7 +596,7 @@ EOF
test_expect_success 'prepare am_session' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b am_session &&
test_commit one_am one.txt "one" &&
test_commit two_am two.txt "two" &&
@@ -669,7 +669,7 @@ EOF
test_expect_success 'status when bisecting' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b bisect &&
test_commit one_bisect main.txt one &&
test_commit two_bisect main.txt two &&
@@ -692,7 +692,7 @@ EOF
test_expect_success 'status when rebase --apply conflicts with statushints disabled' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b statushints_disabled &&
test_when_finished "git config --local advice.statushints true" &&
git config --local advice.statushints false &&
@@ -717,7 +717,7 @@ EOF
test_expect_success 'prepare for cherry-pick conflicts' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b cherry_branch &&
test_commit one_cherry main.txt one &&
test_commit two_cherries main.txt two &&
@@ -828,7 +828,7 @@ EOF
'
test_expect_success 'status while reverting commit (conflicts)' '
- git checkout master &&
+ git checkout main &&
echo before >to-revert.txt &&
test_commit before to-revert.txt &&
echo old >to-revert.txt &&
@@ -838,7 +838,7 @@ test_expect_success 'status while reverting commit (conflicts)' '
TO_REVERT=$(git rev-parse --short HEAD^) &&
test_must_fail git revert $TO_REVERT &&
cat >expected <<EOF &&
-On branch master
+On branch main
You are currently reverting commit $TO_REVERT.
(fix conflicts and run "git revert --continue")
(use "git revert --skip" to skip this patch)
@@ -859,7 +859,7 @@ test_expect_success 'status while reverting commit (conflicts resolved)' '
echo reverted >to-revert.txt &&
git add to-revert.txt &&
cat >expected <<EOF &&
-On branch master
+On branch main
You are currently reverting commit $TO_REVERT.
(all conflicts fixed: run "git revert --continue")
(use "git revert --skip" to skip this patch)
@@ -878,7 +878,7 @@ EOF
test_expect_success 'status after reverting commit' '
git revert --continue &&
cat >expected <<\EOF &&
-On branch master
+On branch main
nothing to commit (use -u to show untracked files)
EOF
git status --untracked-files=no >actual &&
@@ -892,7 +892,7 @@ test_expect_success 'status while reverting after committing conflict resolution
echo reverted >to-revert.txt &&
git commit -a &&
cat >expected <<EOF &&
-On branch master
+On branch main
Revert currently in progress.
(run "git revert --continue" to continue)
(use "git revert --skip" to skip this patch)
@@ -905,7 +905,7 @@ EOF
'
test_expect_success 'prepare for different number of commits rebased' '
- git reset --hard master &&
+ git reset --hard main &&
git checkout -b several_commits &&
test_commit one_commit main.txt one &&
test_commit two_commit main.txt two &&