Revert "[BUG] Initalize Git for hook regeneration"

This reverts commit 815abad84c.

Redundant with:

 Always write proc-receive hook for all git versions (#29287)
This commit is contained in:
Earl Warren 2024-02-26 21:39:12 +01:00
parent 52bf6bf60c
commit d3a642a7e0
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 0579CB2928A78A00

View file

@ -5,7 +5,6 @@ package cmd
import (
asymkey_model "code.gitea.io/gitea/models/asymkey"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/graceful"
repo_service "code.gitea.io/gitea/services/repository"
@ -33,12 +32,6 @@ func runRegenerateHooks(_ *cli.Context) error {
if err := initDB(ctx); err != nil {
return err
}
// Detection of ProcReceive support relies on Git module being initalized.
if err := git.InitFull(ctx); err != nil {
return err
}
return repo_service.SyncRepositoryHooks(graceful.GetManager().ShutdownContext())
}