summaryrefslogtreecommitdiff
path: root/t/t3203-branch-output.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-xt/t3203-branch-output.sh40
1 files changed, 20 insertions, 20 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index a2144dd..a7d2edd 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='git branch display tests'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -29,7 +29,7 @@ test_expect_success 'make remote branches' '
cat >expect <<'EOF'
branch-one
branch-two
-* master
+* main
EOF
test_expect_success 'git branch shows local branches' '
git branch >actual &&
@@ -63,7 +63,7 @@ test_expect_success 'git branch -r shows remote branches' '
cat >expect <<'EOF'
branch-one
branch-two
-* master
+* main
remotes/origin/HEAD -> origin/branch-one
remotes/origin/branch-one
remotes/origin/branch-two
@@ -155,7 +155,7 @@ test_expect_success 'git branch shows detached HEAD properly' '
* (HEAD detached at $(git rev-parse --short HEAD^0))
branch-one
branch-two
- master
+ main
EOF
git checkout HEAD^0 &&
git branch >actual &&
@@ -163,12 +163,12 @@ EOF
'
test_expect_success 'git branch shows detached HEAD properly after checkout --detach' '
- git checkout master &&
+ git checkout main &&
cat >expect <<EOF &&
* (HEAD detached at $(git rev-parse --short HEAD^0))
branch-one
branch-two
- master
+ main
EOF
git checkout --detach &&
git branch >actual &&
@@ -180,7 +180,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving' '
* (HEAD detached from $(git rev-parse --short HEAD))
branch-one
branch-two
- master
+ main
EOF
git reset --hard HEAD^1 &&
git branch >actual &&
@@ -192,9 +192,9 @@ test_expect_success 'git branch shows detached HEAD properly from tag' '
* (HEAD detached at fromtag)
branch-one
branch-two
- master
+ main
EOF
- git tag fromtag master &&
+ git tag fromtag main &&
git checkout fromtag &&
git branch >actual &&
test_i18ncmp expect actual
@@ -205,7 +205,7 @@ test_expect_success 'git branch shows detached HEAD properly after moving from t
* (HEAD detached from fromtag)
branch-one
branch-two
- master
+ main
EOF
git reset --hard HEAD^1 &&
git branch >actual &&
@@ -217,7 +217,7 @@ test_expect_success 'git branch `--sort` option' '
* (HEAD detached from fromtag)
branch-two
branch-one
- master
+ main
EOF
git branch --sort=objectsize >actual &&
test_i18ncmp expect actual
@@ -226,7 +226,7 @@ test_expect_success 'git branch `--sort` option' '
test_expect_success 'git branch --points-at option' '
cat >expect <<-\EOF &&
branch-one
- master
+ main
EOF
git branch --points-at=branch-one >actual &&
test_cmp expect actual
@@ -263,14 +263,14 @@ test_expect_success 'sort branches, ignore case' '
cat >expected <<-\EOF &&
BRANCH-two
branch-one
- master
+ main
EOF
test_cmp expected actual &&
git branch --list -i | awk "{print \$NF}" >actual &&
cat >expected <<-\EOF &&
branch-one
BRANCH-two
- master
+ main
EOF
test_cmp expected actual
)
@@ -282,7 +282,7 @@ test_expect_success 'git branch --format option' '
Refname is refs/heads/ambiguous
Refname is refs/heads/branch-one
Refname is refs/heads/branch-two
- Refname is refs/heads/master
+ Refname is refs/heads/main
Refname is refs/heads/ref-to-branch
Refname is refs/heads/ref-to-remote
EOF
@@ -296,7 +296,7 @@ test_expect_success 'worktree colors correct' '
ambiguous<RESET>
branch-one<RESET>
+ <CYAN>branch-two<RESET>
- master<RESET>
+ main<RESET>
ref-to-branch<RESET> -> branch-one
ref-to-remote<RESET> -> origin/branch-one
EOF
@@ -309,9 +309,9 @@ test_expect_success 'worktree colors correct' '
'
test_expect_success "set up color tests" '
- echo "<RED>master<RESET>" >expect.color &&
- echo "master" >expect.bare &&
- color_args="--format=%(color:red)%(refname:short) --list master"
+ echo "<RED>main<RESET>" >expect.color &&
+ echo "main" >expect.bare &&
+ color_args="--format=%(color:red)%(refname:short) --list main"
'
test_expect_success '%(color) omitted without tty' '
@@ -334,7 +334,7 @@ test_expect_success '--color overrides auto-color' '
test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output lists worktree path' '
one=$(git rev-parse --short HEAD) &&
- two=$(git rev-parse --short master) &&
+ two=$(git rev-parse --short main) &&
cat >expect <<-EOF &&
* (HEAD detached from fromtag) $one one
ambiguous $one one