Update modules/setting/repository.go

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
Dmitry Frolov
2023-05-19 06:44:48 +00:00
committed by GitHub
co-authored by KN4CK3R
parent 57c94e63cb
commit 656a3dc721
+1 -7
View File
@@ -298,13 +298,7 @@ func loadRepositoryFrom(rootCfg ConfigProvider) {
sec := rootCfg.Section("repository")
EnableSizeLimit = sec.Key("ENABLE_SIZE_LIMIT").MustBool(false)
v, err := humanize.ParseBytes(sec.Key("REPO_SIZE_LIMIT").MustString("0"))
if err == nil {
RepoSizeLimit = int64(v)
} else {
RepoSizeLimit = 0
}
RepoSizeLimit, _ = humanize.ParseBytes(sec.Key("REPO_SIZE_LIMIT").MustString("0"))
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
Repository.UseCompatSSHURI = sec.Key("USE_COMPAT_SSH_URI").MustBool()