summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/context/repo.go2
-rw-r--r--modules/setting/setting.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 8b52a20a4a..b3d483df3f 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -256,7 +256,7 @@ func RepoAssignment(args ...bool) macaron.Handler {
ctx.Data["IsRepositoryWriter"] = ctx.Repo.IsWriter()
ctx.Data["DisableSSH"] = setting.SSH.Disabled
- ctx.Data["DisableHTTP"] = setting.Repository.DisableHttpGit
+ ctx.Data["DisableHTTP"] = setting.Repository.DisableHTTPGit
ctx.Data["CloneLink"] = repo.CloneLink()
ctx.Data["WikiCloneLink"] = repo.WikiCloneLink()
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 0e0d8f9d3a..6470031071 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -116,7 +116,7 @@ var (
MirrorQueueLength int
PullRequestQueueLength int
PreferredLicenses []string
- DisableHttpGit bool
+ DisableHTTPGit bool
// Repository editor settings
Editor struct {
@@ -491,6 +491,7 @@ func NewContext() {
// Determine and create root git repository path.
sec = Cfg.Section("repository")
+ Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
forcePathSeparator(RepoRootPath)
if !filepath.IsAbs(RepoRootPath) {