summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-06-20 00:53:37 +0800
committerLauris BH <lauris@nix.lv>2019-06-19 19:53:37 +0300
commit8ec659722df32048561c713f2d533a20a7f0d5ef (patch)
tree65294eb54428215b23401081c657881680168ed1 /routers
parenta71cabbd537d2ca3f937e8fb986315ccc6701270 (diff)
downloadgitea-8ec659722df32048561c713f2d533a20a7f0d5ef.tar.gz
gitea-8ec659722df32048561c713f2d533a20a7f0d5ef.zip
Only check and config git on web subcommand but not others (#7236)
* only check and config git on web subcommand but not others * add Init in git tests
Diffstat (limited to 'routers')
-rw-r--r--routers/init.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/init.go b/routers/init.go
index e6b23cf8b8..e431260687 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -65,6 +65,9 @@ func initDBEngine() (err error) {
// GlobalInit is for global configuration reload-able.
func GlobalInit() {
setting.NewContext()
+ if err := git.Init(); err != nil {
+ log.Fatal("Git module init failed: %v", err)
+ }
setting.CheckLFSVersion()
log.Trace("AppPath: %s", setting.AppPath)
log.Trace("AppWorkPath: %s", setting.AppWorkPath)