diff --git a/services/repository/adopt.go b/services/repository/adopt.go index 0df0aa049b136..46050cc5e41d7 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -340,7 +340,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 }