Hi… I am well aware that this diff view is very suboptimal. It will be fixed when the refactored server comes along!
remote_url.go: Don't use path.Join (it strips :// into :/)
package main import ( "net/url"
"path"
"strings"
)
func generate_ssh_remote_url(group_name, repo_name string) string {
return path.Join(config.SSH.Root, url.PathEscape(group_name), "/:/repos/", url.PathEscape(repo_name))
return strings.TrimSuffix(config.SSH.Root, "/") + "/" + url.PathEscape(group_name) + "/:/repos/" + url.PathEscape(repo_name)
}
func generate_http_remote_url(group_name, repo_name string) string {
return path.Join(config.HTTP.Root, url.PathEscape(group_name), "/:/repos/", url.PathEscape(repo_name))
return strings.TrimSuffix(config.HTTP.Root, "/") + "/" + url.PathEscape(group_name) + "/:/repos/" + url.PathEscape(repo_name)
}