1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-18 08:04:25 +00:00
gitea/routers
마누엘 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
..
admin Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
api/v1 Added Full Name to CreateUser api call (#3333) 2016-07-27 02:43:06 +08:00
dev Rename module: middleware -> context 2016-03-11 11:56:52 -05:00
org Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
repo routers/repo/release: Use correct branch reference (#3330) 2016-07-27 16:57:32 +08:00
user #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
home.go #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
install.go Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00