diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-19 02:44:23 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-20 02:44:18 +0300 |
commit | d6c6b10817409ed93d3c1f65b3d0d2b0875165d4 (patch) | |
tree | 5a9990c3ab13c2a91abc705199c79f1ec030690d /t/t3203-branch-output.sh | |
parent | 883b98efade212bf1496a93dd8a691355a31daf0 (diff) |
t3[0-3]*: adjust the references to the default branch name "main"
Carefully excluding t3040, 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' -- t3[0-3]*.sh t3206/* &&
git checkout HEAD -- t3040\*)
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/t3203-branch-output.sh')
-rwxr-xr-x | t/t3203-branch-output.sh | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index a2144dd8e5..a7d2edd988 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 |