This repository has been archived on 2023-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
gitea/services
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
..
agit Fix various typos (#18219) 2022-01-10 17:32:37 +08:00
asymkey Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
attachment Simplify parameter types (#18006) 2021-12-20 04:41:31 +00:00
auth Fix login with email panic when email is not exist (#18942) 2022-02-28 18:14:50 +00:00
comments Move repository model into models/repo (#17933) 2021-12-10 09:27:50 +08:00
cron Some repository refactors (#17950) 2021-12-12 23:48:20 +08:00
externalaccount Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
forms Support webauthn (#17957) 2022-01-14 16:03:31 +01:00
gitdiff Bump to build with go1.18 (#19120 et al) (#19127) 2022-03-19 18:46:47 +01:00
issue Restore propagation of ErrDependenciesLeft (#18325) 2022-01-19 00:26:42 +01:00
lfs Support webauthn (#17957) 2022-01-14 16:03:31 +01:00
mailer Try to prevent autolinking of displaynames by email readers (#19169) (#19183) 2022-03-23 15:18:11 +02:00
migrations Make migrations SKIP_TLS_VERIFY apply to git too (#19132) (#19141) 2022-03-19 16:20:26 +00:00
mirror Refactor mirror code & fix StartToMirror (#18904) (#19075) 2022-03-14 20:04:41 +08:00
org Move repository model into models/repo (#17933) 2021-12-10 09:27:50 +08:00
pull Detect conflicts with 3way merge (#18536) (#18537) 2022-02-02 14:35:25 +00:00
release Set HeadCommit when creating tags. (#18116) 2021-12-29 19:40:57 +08:00
repository Fix compare link in active feeds for new branch (#19149) (#19185) 2022-03-23 19:04:50 +00:00
task Some repository refactors (#17950) 2021-12-12 23:48:20 +08:00
user Move keys to models/asymkey (#17917) 2021-12-10 16:14:24 +08:00
webhook Add replay of webhooks. (#18191) 2022-01-05 15:00:20 -06:00
wiki Fix various typos (#18219) 2022-01-10 17:32:37 +08:00