diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 95db323f5c..106ce35221 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -796,7 +796,7 @@ func HomeWithFeedCheck(ctx *context.Context) { ctx.Redirect(ctx.Repo.RepoLink+defaultURI, http.StatusMovedPermanently) } -// CodeHome render repository home page +// CodeHome render repository code unit page func CodeHome(ctx *context.Context) { checkHomeCodeViewable(ctx) if ctx.Written() { diff --git a/routers/web/web.go b/routers/web/web.go index a0c47fc709..8f211d6b60 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1581,10 +1581,10 @@ func registerRoutes(m *web.Router) { m.Get("/atom/branch/*", context.RepoRefByType(context.RepoRefBranch), feedEnabled, feed.RenderBranchFeed) 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("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) // "/*" route is deprecated, and kept for backward compatibility + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CodeHome) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CodeHome) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.CodeHome) + m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.CodeHome) // "/*" route is deprecated, and kept for backward compatibility }, repo.SetEditorconfigIfExists) m.Get("/forks", context.RepoRef(), repo.Forks)