aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-04-09 12:26:48 +0800
committerGitHub <noreply@github.com>2022-04-08 23:26:48 -0500
commitd906858847e0d345bc02f04b4037dfa80650889e (patch)
tree7632699bb22dd4f7e6b61113835e60ddf7aaf34d /models
parent1dfa26e00e8e1ce6f6125335871da1d402a63466 (diff)
downloadgitea-d906858847e0d345bc02f04b4037dfa80650889e.tar.gz
gitea-d906858847e0d345bc02f04b4037dfa80650889e.zip
Use "main" as default branch name (#19354)
* Use "main" as default branch name * fix test code
Diffstat (limited to 'models')
-rw-r--r--models/unittest/testdb.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index b6924d4706..4f1bd63f29 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -69,6 +69,7 @@ func MainTest(m *testing.M, pathToGiteaRoot string, fixtureFiles ...string) {
setting.SSH.Port = 3000
setting.SSH.Domain = "try.gitea.io"
setting.Database.UseSQLite3 = true
+ setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master"
repoRootPath, err := os.MkdirTemp(os.TempDir(), "repos")
if err != nil {
fatalTestError("TempDir: %v\n", err)