Skip to content

Commit 654bd7e

Browse files
dschogitster
authored andcommitted
t3205: finalize transitioning to using the branch name main
In 66713e8 (tests: prepare aligned mentions of the default branch name, 2020-10-23), we started that transition, trying to prepare for a time when `git init` would use that name for the initial branch. Even if that time has not arrived, we can complete the transition by making the test script independent of the default branch name. This also allows us to drop the `PREPARE_FOR_MAIN_BRANCH` prereq from one test case. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1eee0a4 commit 654bd7e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

t/t3205-branch-color.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ test_description='basic branch output coloring'
55

66
test_expect_success 'set up some sample branches' '
77
test_commit foo &&
8-
git update-ref refs/remotes/origin/master HEAD &&
8+
git branch -M main &&
9+
git update-ref refs/remotes/origin/main HEAD &&
910
git update-ref refs/heads/other HEAD
1011
'
1112

@@ -19,16 +20,16 @@ test_expect_success 'set up some color config' '
1920

2021
test_expect_success 'regular output shows colors' '
2122
cat >expect <<-\EOF &&
22-
* <CYAN>master<RESET>
23+
* <CYAN>main<RESET>
2324
<BLUE>other<RESET>
24-
<YELLOW>remotes/origin/master<RESET>
25+
<YELLOW>remotes/origin/main<RESET>
2526
EOF
2627
git branch --color -a >actual.raw &&
2728
test_decode_color <actual.raw >actual &&
2829
test_cmp expect actual
2930
'
3031

31-
test_expect_success PREPARE_FOR_MAIN_BRANCH 'verbose output shows colors' '
32+
test_expect_success 'verbose output shows colors' '
3233
oid=$(git rev-parse --short HEAD) &&
3334
cat >expect <<-EOF &&
3435
* <CYAN>main <RESET> $oid foo

0 commit comments

Comments
 (0)