Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-29 13:16:10 +01:00
forgejo/routers
Gusted e02baca55c
[GITEA] Simplify blame handler
- Remove unnecessary checks for `ctx.Repo.TreePath`, because it will
already early-return if it's empty.
- Simplify `performBlame` to extract the repoPath from the context.
- Don't render the topics, as they are not shown in the blame
page (there's a condition in the template for the blame page).
- Fix that `performBlame` doesn't call `NotFound`, it should instead
only return the error.
- Fix that the error handlings call `ServerError` instead of `NotFound`.
- Simplify `bypass-blame-ignore` to use `ctx.FormBool`.
- Remove `TreeLink`, `HasParentPath` and `ParentPath` as it's not used
in the blame template.
- Inline `BranchLink` and `RawFileLink` string operations.
- Move around `NumLines` to make it clear the error is handled.
- Less code, less things the code does, more readable and thus more
maintanable!
2024-01-22 21:07:05 +01:00
..
api Revert "Fix schedule tasks bugs (#28691)" 2024-01-22 18:13:43 +00:00
common Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
install [GITEA] Add password length check on install page 2024-01-22 14:35:03 +00:00
private [CLI] implement forgejo-cli 2024-01-22 12:18:30 +00:00
utils Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
web [GITEA] Simplify blame handler 2024-01-22 21:07:05 +01:00
init.go [API] Forgejo API /api/forgejo/v1 2024-01-22 13:41:20 +00:00