aboutsummaryrefslogtreecommitdiff
path: root/models/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/repo.go')
-rw-r--r--models/repo/repo.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/models/repo/repo.go b/models/repo/repo.go
index f5b93d6da..4759a9f69 100644
--- a/models/repo/repo.go
+++ b/models/repo/repo.go
@@ -27,7 +27,7 @@ import (
var (
reservedRepoNames = []string{".", ".."}
- reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"}
+ reservedRepoPatterns = []string{"*.git", "*.wiki", "*.projectbase", "*.rss", "*.atom"}
)
// IsUsableRepoName returns true when repository is usable
@@ -541,11 +541,8 @@ func ComposeHTTPSCloneURL(owner, repo string) string {
return fmt.Sprintf("%s%s/%s.git", setting.AppURL, url.PathEscape(owner), url.PathEscape(repo))
}
-func (repo *Repository) cloneLink(isWiki bool) *CloneLink {
- repoName := repo.Name
- if isWiki {
- repoName += ".wiki"
- }
+func (repo *Repository) cloneLink(suffix string) *CloneLink {
+ repoName := repo.Name + suffix
sshUser := setting.SSH.User
@@ -572,7 +569,7 @@ func (repo *Repository) cloneLink(isWiki bool) *CloneLink {
// CloneLink returns clone URLs of repository.
func (repo *Repository) CloneLink() (cl *CloneLink) {
- return repo.cloneLink(false)
+ return repo.cloneLink("")
}
// GetOriginalURLHostname returns the hostname of a URL or the URL