1
0
Fork 0
forked from forgejo/forgejo

Add UseCompatSSHURI setting (#2356)

* Add UseCompatSSHURI setting

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com> (+1 squashed commits)

Squashed commits:

[dda2dc79] Add ForceCloneSSHURL setting

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>

* Make protocol if construct more readable

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
This commit is contained in:
Manuel 2017-08-26 15:57:41 +02:00 committed by Thomas Boerger
parent f61a1d210c
commit d9d8fad230
3 changed files with 8 additions and 0 deletions

View file

@ -161,6 +161,7 @@ var (
PullRequestQueueLength int
PreferredLicenses []string
DisableHTTPGit bool
UseCompatSSHURI bool
// Repository editor settings
Editor struct {
@ -189,6 +190,7 @@ var (
PullRequestQueueLength: 1000,
PreferredLicenses: []string{"Apache License 2.0,MIT License"},
DisableHTTPGit: false,
UseCompatSSHURI: false,
// Repository editor settings
Editor: struct {
@ -903,6 +905,7 @@ func NewContext() {
// Determine and create root git repository path.
sec = Cfg.Section("repository")
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)
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gitea-repositories"))
forcePathSeparator(RepoRootPath)