aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/create.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-06 14:26:32 +0800
committerGitHub <noreply@github.com>2024-03-06 14:26:32 +0800
commit5cddab4f74bbb307ddf13e458c7ac22f93b9283a (patch)
tree2eee924ffdbc2e1bedb6b63020e7b7fdd86417c3 /services/repository/create.go
parentda15d6127c8d430dfc069f9815ce783dd9ca35f7 (diff)
downloadgitea-5cddab4f74bbb307ddf13e458c7ac22f93b9283a.tar.gz
gitea-5cddab4f74bbb307ddf13e458c7ac22f93b9283a.zip
Make wiki default branch name changable (#29603)
Fix #29000 Fix #28685 Fix #18568 Related: #27497 And by the way fix #24036, add a Cancel button there (one line)
Diffstat (limited to 'services/repository/create.go')
-rw-r--r--services/repository/create.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/repository/create.go b/services/repository/create.go
index c47ce9c413..8d8c39197d 100644
--- a/services/repository/create.go
+++ b/services/repository/create.go
@@ -173,6 +173,7 @@ func initRepository(ctx context.Context, repoPath string, u *user_model.User, re
}
repo.DefaultBranch = setting.Repository.DefaultBranch
+ repo.DefaultWikiBranch = setting.Repository.DefaultBranch
if len(opts.DefaultBranch) > 0 {
repo.DefaultBranch = opts.DefaultBranch
@@ -240,6 +241,7 @@ func CreateRepositoryDirectly(ctx context.Context, doer, u *user_model.User, opt
TrustModel: opts.TrustModel,
IsMirror: opts.IsMirror,
DefaultBranch: opts.DefaultBranch,
+ DefaultWikiBranch: setting.Repository.DefaultBranch,
ObjectFormatName: opts.ObjectFormatName,
}