-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Broken "compare n commits" link in activity overview when pushing new branch #19144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
a1012112796
added a commit
to a1012112796/gitea
that referenced
this issue
Mar 20, 2022
fix go-gitea#19144 Signed-off-by: a1012112796 <[email protected]>
zeripath
added a commit
that referenced
this issue
Mar 23, 2022
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 <[email protected]> Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Andrew Thornton <[email protected]>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Mar 23, 2022
Backport go-gitea#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 go-gitea#19144 Signed-off-by: a1012112796 <[email protected]> Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Andrew Thornton <[email protected]> Co-authored-by: a1012112796 <[email protected]>
zeripath
added a commit
that referenced
this issue
Mar 23, 2022
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 <[email protected]> Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Andrew Thornton <[email protected]> Co-authored-by: a1012112796 <[email protected]>
Chianina
pushed a commit
to Chianina/gitea
that referenced
this issue
Mar 28, 2022
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 go-gitea#19144 Signed-off-by: a1012112796 <[email protected]> Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Andrew Thornton <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Gitea Version
1.16.4
Git Version
2.30.2
Operating System
Debian bullseye
How are you running Gitea?
Through the 3rd party debian package repo.
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
Pushing to a branch which wasn't previously known to gitea leads to broken compare links like this in the activity overview
https://server/nidi/test-gitea-issues/compare/0000000000000000000000000000000000000000...f6f27fa74aaecedbcf4b4a3625ceafd6fc368ef6
This happens when doing
I wasn't able to reproduce this on try.gitea.io as I stumbled over #19143 instead.
Screenshots
No response
The text was updated successfully, but these errors were encountered: