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
This commit is contained in:
parent
a71cabbd53
commit
8ec659722d
4 changed files with 35 additions and 25 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue