1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-23 08:47:42 -05:00
forgejo/routers/repo
마누엘 fe60ca408b routers/repo/release: Use correct branch reference (#3330)
When calculating the current behind commit count the calculation should
use the current release target to get the total commit count. Should the
release target not exist anymore the calculation will return zero for
the newest release on that target. Older releases on that target will then
use that calculated commit count as reference.

The only use case that is now somehow invalid is when the release target
was merged / deleted after a tag on that release target:

    master 1 - - - - - - - 6
            \             /
    branch   2 - 3 - 4 - 5

When `4` is the last tag on branch `branch` and the branch `branch` is not
yet deleted the calculated numbers would be:

    1 commits to branch since this release

Now if the branch `branch` gets deleted the calculation function will not
find the branch and use the commit count of the newest release (`4`) as
reference resulting in:

    0 commit to branch since this release

This fixes #3326
2016-07-27 16:57:32 +08:00
..
branch.go Rename module: middleware -> context 2016-03-11 11:56:52 -05:00
commit.go Re-work MAX_DIFF_LINES: supress diff per file, not the whole diff (#3174) 2016-06-29 23:11:00 +08:00
download.go Set utf-8 charset for text files when serving raw content (#2898) 2016-04-20 19:38:11 -04:00
http.go Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
issue.go routers/repo/issue: remove redundant format string 2016-07-26 18:42:18 +08:00
pull.go Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
release.go routers/repo/release: Use correct branch reference (#3330) 2016-07-27 16:57:32 +08:00
repo.go Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
setting.go Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
view.go Use struct for UI settings 2016-07-24 00:23:54 +08:00
webhook.go Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
wiki.go Do not show filename not have suffifx .md 2016-07-01 15:34:03 +08:00