1
0
Fork 0
forked from forgejo/forgejo

Add option to blame files (#5721)

This commit is contained in:
Andrzej Ressel 2019-04-20 04:47:00 +02:00 committed by techknowlogick
parent b9d1fb6de3
commit 469d9b7d9a
10 changed files with 631 additions and 2 deletions

View file

@ -849,6 +849,12 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.RefCommits)
}, repo.MustBeNotEmpty, reqRepoCodeReader)
m.Group("/blame", func() {
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.RefBlame)
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefBlame)
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.RefBlame)
}, repo.MustBeNotEmpty, reqRepoCodeReader)
m.Group("", func() {
m.Get("/graph", repo.Graph)
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)