Description
Description
Follow up on #31163. This issue has been worked around in the mentioned issue and this issue is for solving the root problem.
The issue starts to appear, when you upgrade from a pre-1.22
version to the 1.22
version.
The problem displayed itself as the user trying to open a repository and then hitting a HTTP 500 Error, because the system tries to find the default branch named main
. Right now, this error is not displayed in the Nightly version of 1.22
, because it is just hidden and ignored. The root issue remains unsolved.
I use this space to clarify and further detail the description of the root problem.
This comment by a maintainer suggests, that when a default branch by the default name is missing, the branch might've been deleted, renamed or a default branch might simply not be set, which happened between the upgrade from an older version to 1.22
, before the workaround was released.
I can 100% confirm, that this is not the case. My repositories worked for all previous versions, then I switched to 1.22
and suddenly the system looks for a branch, that never existed in any of the repositories on my instance in the first place. No default branches have been ever re-assigned or even deleted.
The root problem is related to the system trying to find the default branch main
, even though, there is no reason for looking for it. Even, if it has never been there. It still looks for it. This is one question, that needs to be answered, to be able to properly fix the issue.
I welcome other affected users to comment on this issue and add further information for clarifying the issue at hand.
Gitea Version
1.22-nightly
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Kubernetes via Helm
(Happens on any type of deployment, though.)
Database
PostgreSQL