|
|
|
@ -1042,11 +1042,11 @@ func RegisterRoutes(m *web.Route) {
|
|
|
|
|
}, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) |
|
|
|
|
|
|
|
|
|
m.Group("/src", func() { |
|
|
|
|
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home) |
|
|
|
|
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home) |
|
|
|
|
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home) |
|
|
|
|
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Code) |
|
|
|
|
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Code) |
|
|
|
|
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Code) |
|
|
|
|
// "/*" route is deprecated, and kept for backward compatibility
|
|
|
|
|
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) |
|
|
|
|
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Code) |
|
|
|
|
}, repo.SetEditorconfigIfExists) |
|
|
|
|
|
|
|
|
|
m.Group("", func() { |
|
|
|
@ -1067,6 +1067,7 @@ func RegisterRoutes(m *web.Route) {
|
|
|
|
|
m.Group("/{username}", func() { |
|
|
|
|
m.Group("/{reponame}", func() { |
|
|
|
|
m.Get("", repo.SetEditorconfigIfExists, repo.Home) |
|
|
|
|
m.Get("/code", repo.SetEditorconfigIfExists, repo.Code) |
|
|
|
|
}, ignSignIn, context.RepoAssignment, context.RepoRef(), context.UnitTypes()) |
|
|
|
|
|
|
|
|
|
m.Group("/{reponame}", func() { |
|
|
|
|