diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-06-20 00:53:37 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-06-19 19:53:37 +0300 |
commit | 8ec659722df32048561c713f2d533a20a7f0d5ef (patch) | |
tree | 65294eb54428215b23401081c657881680168ed1 /routers | |
parent | a71cabbd537d2ca3f937e8fb986315ccc6701270 (diff) | |
download | gitea-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.go | 3 |
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) |