summaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-05-15 09:57:00 +0800
committerGitHub <noreply@github.com>2019-05-15 09:57:00 +0800
commit710245e81e0d65c72231dbb3b5c9f860cdc71899 (patch)
tree6987b804cb38ab175e6749e7c4b9e77b0362e499 /routers/admin/admin.go
parent95d3d42c5fd51bcc64774841edad158f6e5ef60f (diff)
downloadgitea-710245e81e0d65c72231dbb3b5c9f860cdc71899.tar.gz
gitea-710245e81e0d65c72231dbb3b5c9f860cdc71899.zip
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
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 7b8422fc61..0e6fa2c242 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -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