mirror of https://github.com/go-gitea/gitea.git
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. |
||
---|---|---|
.. | ||
e2e | ||
fuzz | ||
gitea-lfs-meta | ||
gitea-repositories-meta | ||
integration | ||
mssql.ini.tmpl | ||
mysql.ini.tmpl | ||
mysql8.ini.tmpl | ||
pgsql.ini.tmpl | ||
sqlite.ini.tmpl | ||
test_utils.go |