From 20856faa7ebec69b0518ff25261a1c6df9a0b160 Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Mon, 5 Dec 2022 02:09:32 +0100 Subject: [PATCH] Fix spurious unadopted repositories The size of the array must not exceed the `IterateBufferSize`. --- services/repository/adopt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/repository/adopt.go b/services/repository/adopt.go index 828068e8ec168..93eeb56456f45 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -337,7 +337,7 @@ func ListUnadoptedRepositories(query string, opts *db.ListOptions) ([]string, in } repoNamesToCheck = append(repoNamesToCheck, name) - if len(repoNamesToCheck) > setting.Database.IterateBufferSize { + if len(repoNamesToCheck) >= setting.Database.IterateBufferSize { if err = checkUnadoptedRepositories(userName, repoNamesToCheck, unadopted); err != nil { return err }