mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 21:57:14 -04:00
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>
This commit is contained in:
parent
820031e556
commit
75d96f4a02
14 changed files with 63 additions and 149 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue