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 }