Skip to content

Commit

Permalink
Call git.InitSimple for runRepoSyncReleases (go-gitea#26396) (go-gite…
Browse files Browse the repository at this point in the history
…a#26450)

Backport go-gitea#26396 by @wxiaoguang

Fix go-gitea#26394

Otherwise, the git module is not initialized and it doesn't respect the
"timeout" config in app.ini

Co-authored-by: wxiaoguang <[email protected]>
  • Loading branch information
GiteaBot and wxiaoguang authored Aug 10, 2023
1 parent 7c555b2 commit d6cf261
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ func runRepoSyncReleases(_ *cli.Context) error {
return err
}

if err := git.InitSimple(ctx); err != nil {
return err
}

log.Trace("Synchronizing repository releases (this may take a while)")
for page := 1; ; page++ {
repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{
Expand Down

0 comments on commit d6cf261

Please sign in to comment.