1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 04:28:21 +00:00

Fix go-get, src and raw urls to new scheme (#2978) (#2986)

This commit is contained in:
Lauris BH
2017-11-27 04:02:08 +02:00
committed by Lunny Xiao
parent 9c07d909e6
commit 460d0d9077
5 changed files with 15 additions and 15 deletions

View File

@@ -182,7 +182,7 @@ func Contexter() macaron.Handler {
branchName = repo.DefaultBranch
}
}
prefix := setting.AppURL + path.Join(ownerName, repoName, "src", branchName)
prefix := setting.AppURL + path.Join(ownerName, repoName, "src", "branch", branchName)
c.PlainText(http.StatusOK, []byte(com.Expand(`
<html>
<head>

View File

@@ -453,7 +453,7 @@ func RepoAssignment() macaron.Handler {
if ctx.Query("go-get") == "1" {
ctx.Data["GoGetImport"] = ComposeGoGetImport(owner.Name, repo.Name)
prefix := setting.AppURL + path.Join(owner.Name, repo.Name, "src", ctx.Repo.BranchName)
prefix := setting.AppURL + path.Join(owner.Name, repo.Name, "src", "branch", ctx.Repo.BranchName)
ctx.Data["GoDocDirectory"] = prefix + "{/dir}"
ctx.Data["GoDocFile"] = prefix + "{/dir}/{file}#L{line}"
}