diff options
Diffstat (limited to 't')
| -rwxr-xr-x | t/t0001-init.sh | 2 | ||||
| -rw-r--r-- | t/test-lib.sh | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index df0040b9ac..618da080dc 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -868,7 +868,7 @@ test_expect_success 'overridden default initial branch name (config)' ' grep nmb actual ' -test_expect_success !WITH_BREAKING_CHANGES 'advice on unconfigured init.defaultBranch' ' +test_expect_success 'advice on unconfigured init.defaultBranch' ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= git -c color.advice=always \ init unconfigured-default-branch-name 2>err && test_decode_color <err >decoded && diff --git a/t/test-lib.sh b/t/test-lib.sh index b191954c3c..562f950fb0 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -127,13 +127,17 @@ then export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS fi +# Explicitly set the default branch name for testing, to squelch hints +# from "git init" during the transition period. Should be removed +# after we decide to remove ADVICE_DEFAULT_BRANCH_NAME if test -z "$WITH_BREAKING_CHANGES" then - # Explicitly set the default branch name for testing, to avoid the - # transitory "git init" warning under --verbose. : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master} - export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +else + : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main} fi +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + ################################################################ # It appears that people try to run tests without building... |
