This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/routers
zeripath 6fc73a8433
Fix compare link in active feeds for new branch (#19149) (#19185)
Backport #19149

When a new branch is pushed the old SHA is always listed as the empty sha and thus the compare link that is created does not work correctly.

Therefore when creating the compare link for new branches:

1. Attempt to get the parent of the first commit and use that as the basis
for the compare link.
2. If this is not possible make a comparison to the default branch
3. Finally if that is not possible simply do not show a compare link.

However, there are multiple broken compare links remaining therefore, in order for these to not break we will simply make the compare link redirect to the default branch.

Fix #19144

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
2022-03-23 19:04:50 +00:00
..
api/v1 Fix the bug: deploy key with write access can not push (#19010) (#19182) 2022-03-23 13:44:41 +00:00
common Instead of using routerCtx just escape the url before routing (#18086) 2021-12-25 00:50:49 +08:00
install Refactor HTTP request context (#17979) 2021-12-15 14:59:57 +08:00
private Fix the bug: deploy key with write access can not push (#19010) (#19182) 2022-03-23 13:44:41 +00:00
utils
web Fix compare link in active feeds for new branch (#19149) (#19185) 2022-03-23 19:04:50 +00:00
init.go Handle email address not exist (#19089) (#19121) 2022-03-19 11:35:23 +00:00