mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 06:43:34 +01:00
Merge pull request '[BUG] Initialize Git for hook regeneration' (#2421) from gusted/forgejo-bp-2416 into v1.21/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2421 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
2c567ea193
1 changed files with 6 additions and 0 deletions
|
@ -428,6 +428,12 @@ func runRegenerateHooks(_ *cli.Context) error {
|
|||
if err := initDB(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Detection of ProcReceive support relies on Git module being initialized.
|
||||
if err := git.InitFull(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return repo_service.SyncRepositoryHooks(graceful.GetManager().ShutdownContext())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue