summaryrefslogtreecommitdiffstats
path: root/services/repository/adopt.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/adopt.go')
-rw-r--r--services/repository/adopt.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/repository/adopt.go b/services/repository/adopt.go
index 74876d8e76..9e04c15977 100644
--- a/services/repository/adopt.go
+++ b/services/repository/adopt.go
@@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/container"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
@@ -257,12 +258,12 @@ func checkUnadoptedRepositories(userName string, repoNamesToCheck []string, unad
if len(repos) == len(repoNamesToCheck) {
return nil
}
- repoNames := make(map[string]bool, len(repos))
+ repoNames := make(container.Set[string], len(repos))
for _, repo := range repos {
- repoNames[repo.LowerName] = true
+ repoNames.Add(repo.LowerName)
}
for _, repoName := range repoNamesToCheck {
- if _, ok := repoNames[repoName]; !ok {
+ if !repoNames.Contains(repoName) {
unadopted.add(filepath.Join(userName, repoName))
}
}