aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-11 06:42:48 +0800
committerGitHub <noreply@github.com>2023-08-10 22:42:48 +0000
commitf42cd4561b6ef622b029deedecb2f3e29828a7cb (patch)
tree9de386cb0995e0a0aa4259b0270bed987de54d7a
parentbfef7d47359117a38cc68d558a16259f0668675c (diff)
downloadgitea-f42cd4561b6ef622b029deedecb2f3e29828a7cb.tar.gz
gitea-f42cd4561b6ef622b029deedecb2f3e29828a7cb.zip
Call git.InitSimple for runRepoSyncReleases (#26396)
Fix #26394 Otherwise, the git module is not initialized and it doesn't respect the "timeout" config in app.ini
-rw-r--r--cmd/admin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/admin.go b/cmd/admin.go
index 745427ca24..a4f48b0513 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -355,6 +355,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{