diff options
author | techknowlogick <techknowlogick@gitea.io> | 2020-06-17 16:53:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 16:53:55 -0400 |
commit | 6bf78d2b576a5caa77a670db9bbf2572d0272f25 (patch) | |
tree | 36b547e948ac0c1aed41c5088f397ea50fa905ee /modules/setting | |
parent | 9e6a79bea9d7911c81b86a6d3715d340fc19032a (diff) | |
download | gitea-6bf78d2b576a5caa77a670db9bbf2572d0272f25.tar.gz gitea-6bf78d2b576a5caa77a670db9bbf2572d0272f25.zip |
Global default branch setting (#11918)
* Global default branch setting
* add to app.ini example per @silverwind
* update per @lunny
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/repository.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/repository.go b/modules/setting/repository.go index 3e63d458f8..eb1501d7b8 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -43,6 +43,7 @@ var ( DefaultRepoUnits []string PrefixArchiveFiles bool DisableMirrors bool + DefaultBranch string // Repository editor settings Editor struct { @@ -241,6 +242,7 @@ func newRepository() { Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool() Repository.UseCompatSSHURI = sec.Key("USE_COMPAT_SSH_URI").MustBool() Repository.MaxCreationLimit = sec.Key("MAX_CREATION_LIMIT").MustInt(-1) + Repository.DefaultBranch = sec.Key("DEFAULT_BRANCH").MustString("master") RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gitea-repositories")) forcePathSeparator(RepoRootPath) if !filepath.IsAbs(RepoRootPath) { |