Verified Commit 8c1a9a51 authored by Loïc Dachary's avatar Loïc Dachary
Browse files

repository: cloneLink(suffix) instead of cloneLink(isWiki)


Signed-off-by: Loïc Dachary's avatarLoïc Dachary <loic@dachary.org>
parent 08568d81
......@@ -509,11 +509,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.RunUser
if setting.SSH.StartBuiltinServer {
......@@ -543,7 +540,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
......
......@@ -16,7 +16,7 @@ import (
// WikiCloneLink returns clone URLs of repository wiki.
func (repo *Repository) WikiCloneLink() *CloneLink {
return repo.cloneLink(true)
return repo.cloneLink(".wiki")
}
// WikiPath returns wiki data path by given user and repository name.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment