Make URL scheme unambiguous (#2408)

* Make URL scheme unambiguous

Redirect old routes to new routes

* Fix redirects to new URL scheme, and update template

* Fix branches/_new endpoints, and update integration test
This commit is contained in:
Ethan Koenig 2017-10-29 19:04:25 -07:00 committed by Lunny Xiao
parent 6e98812ecf
commit 513375c429
20 changed files with 279 additions and 144 deletions

View file

@ -120,7 +120,7 @@ func SearchCommits(ctx *context.Context) {
keyword := strings.Trim(ctx.Query("q"), " ")
if len(keyword) == 0 {
ctx.Redirect(ctx.Repo.RepoLink + "/commits/" + ctx.Repo.BranchName)
ctx.Redirect(ctx.Repo.RepoLink + "/commits/" + ctx.Repo.BranchNameSubURL())
return
}
all := ctx.QueryBool("all")