diff options
Diffstat (limited to 'internal/db/repo.go')
-rw-r--r-- | internal/db/repo.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/db/repo.go b/internal/db/repo.go index bb2cd52e..81a6cd00 100644 --- a/internal/db/repo.go +++ b/internal/db/repo.go @@ -1081,8 +1081,14 @@ func initRepository(e Engine, repoPath string, doer *User, repo *Repository, opt } var ( - reservedRepoNames = []string{".", ".."} - reservedRepoPatterns = []string{"*.git", "*.wiki"} + reservedRepoNames = map[string]struct{}{ + ".": {}, + "..": {}, + } + reservedRepoPatterns = []string{ + "*.git", + "*.wiki", + } ) // isRepoNameAllowed return an error if given name is a reserved name or pattern for repositories. |