summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-08-09 11:22:24 +0800
committerGitHub <noreply@github.com>2022-08-09 11:22:24 +0800
commit75d96f4a0274c5b7566305d494c176e1a88b1589 (patch)
treed4dc134d9fea8f0f89f895e7bf30ec39146edf32 /routers
parent820031e556af9548aa07e4de2669ca52bd7f63cb (diff)
downloadgitea-75d96f4a0274c5b7566305d494c176e1a88b1589.tar.gz
gitea-75d96f4a0274c5b7566305d494c176e1a88b1589.zip
Refactor legacy git init (#20376)
* merge `CheckLFSVersion` into `InitFull` (renamed from `InitWithSyncOnce`) * remove the `Once` during git init, no data-race now * for doctor sub-commands, `InitFull` should only be called in initialization stage Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r--routers/init.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/init.go b/routers/init.go
index e640ca4845..612fc5a83d 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -100,10 +100,8 @@ func GlobalInitInstalled(ctx context.Context) {
log.Fatal("Gitea is not installed")
}
- mustInitCtx(ctx, git.InitOnceWithSync)
+ mustInitCtx(ctx, git.InitFull)
log.Info("Git Version: %s (home: %s)", git.VersionInfo(), git.HomeDir())
-
- git.CheckLFSVersion()
log.Info("AppPath: %s", setting.AppPath)
log.Info("AppWorkPath: %s", setting.AppWorkPath)
log.Info("Custom path: %s", setting.CustomPath)