aboutsummaryrefslogtreecommitdiffstats
path: root/README_ZH.md
diff options
context:
space:
mode:
authoroliverpool <3864879+oliverpool@users.noreply.github.com>2023-05-10 05:43:55 +0200
committerGitHub <noreply@github.com>2023-05-10 11:43:55 +0800
commit8030614386b5d3fa02dc294446a344d274b04a26 (patch)
tree33868012ca12609feafbb3e938e0fcb5efeb5130 /README_ZH.md
parent5930ab5fdf7a970fcca3cd50b44cf1cacb615a54 (diff)
downloadgitea-8030614386b5d3fa02dc294446a344d274b04a26.tar.gz
gitea-8030614386b5d3fa02dc294446a344d274b04a26.zip
fix: release page for empty or non-existing target (#24470)
Fixes #24145 To solve the bug, I added a "computed" `TargetBehind` field to the `Release` model, which indicates the target branch of a release. This is particularly useful if the target branch was deleted in the meantime (or is empty). I also did a micro-optimization in `calReleaseNumCommitsBehind`. Instead of checking that a branch exists and then call `GetBranchCommit`, I immediately call `GetBranchCommit` and handle the `git.ErrNotExist` error. This optimization is covered by the added unit test.
Diffstat (limited to 'README_ZH.md')
0 files changed, 0 insertions, 0 deletions