1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 02:08:36 +00:00

Refactor models.NewRepoContext to extract git related codes to modules/git (#6941)

* refactor models.NewRepoContext to extract git related codes to modules/git

* fix imports

* refactor
This commit is contained in:
Lunny Xiao
2019-05-15 09:57:00 +08:00
committed by GitHub
parent 95d3d42c5f
commit 710245e81e
6 changed files with 34 additions and 49 deletions

View File

@@ -18,6 +18,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/cron"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting"
)
@@ -210,7 +211,7 @@ func Config(ctx *context.Context) {
ctx.Data["DisableRouterLog"] = setting.DisableRouterLog
ctx.Data["RunUser"] = setting.RunUser
ctx.Data["RunMode"] = strings.Title(macaron.Env)
ctx.Data["GitVersion"] = setting.Git.Version
ctx.Data["GitVersion"], _ = git.BinVersion()
ctx.Data["RepoRootPath"] = setting.RepoRootPath
ctx.Data["CustomRootPath"] = setting.CustomPath
ctx.Data["StaticRootPath"] = setting.StaticRootPath