summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 621cd31ae1..562f950fb0 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -127,11 +127,18 @@ then
export GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS
fi
-# Explicitly set the default branch name for testing, to avoid the
-# transitory "git init" warning under --verbose.
-: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}
+# 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
+ : ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}
+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...
GIT_BINARY="${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X"