mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 18:04:14 +01:00
8030614386
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. |
||
---|---|---|
.. | ||
admin | ||
api/packages/pypi | ||
base | ||
code | ||
custom | ||
devtest | ||
explore | ||
org | ||
package | ||
projects | ||
repo | ||
shared | ||
status | ||
swagger | ||
user | ||
home.tmpl | ||
install.tmpl | ||
post-install.tmpl |