aboutsummaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh10
1 files changed, 7 insertions, 3 deletions
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...