-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
500 error when default banch doesn't exist on owner/repo/branches page #18265
Comments
Is there any branch in this repository? |
Yes, but the original repository does not contain a 'master' branch ( e.g., https://github.com/pandas-dev/pandas ) |
this is I presume related to an adopted repository? |
@tim-kong Can you help to confirm the problem? How the |
OK. Login as testuser , and just mirror the Pandas repository ('https://github.com/pandas-dev/pandas') using Gitea web page (http://example.com/repo/migrate). Don't need to do anything. And when accessing http://example.com/testuser/pandas/branches you well see 500 error. Thanks. |
Works for me in Gitea 1.15.10. It need some seconds, but it works. My URL: http://nuc-mini-celeron:3000/pandas-dev/pandas/branches
|
I can't reproduce this on main/1.16.0. (I had this right I can't reproduce this on main) |
Can anyone reproduce this on 1.16? |
I can trigger the bug manually in 1.16:
I can imagine a real case: if a user changes a git repository with a different default branch name (eg: changes the git repository on the server), they would also trigger this bug. I am not sure whether force-push would also trigger such bug. Maybe the better behavior is getting rid of the 500 page (internal error should be something serious, but not this case) |
I update my gitea version to 1.15.10, and cannot trigger the bug. |
Actually, 1.15.10 only contains some small fixes, and should not be related to this bug (https://github.com/go-gitea/gitea/releases/tag/v1.15.10) . I suspect you did something or Gitea did something, then the |
Weirdly I wasn't able to do this on pandas. AHA The /owner/repo/branches bit was the thing I was missing. |
It is probably the root cause.... Pandas has recently replace 'master' with 'main', just several days ago. |
This PR more nicely handles a missing default branch in owner/repo/branches Fix go-gitea#18265 Signed-off-by: Andrew Thornton <art27@cantab.net>
I've put a PR in to handle this but we might not necessarily backport it. |
) This PR more nicely handles a missing default branch in owner/repo/branches Fix #18265 Signed-off-by: Andrew Thornton <art27@cantab.net>
…gitea#18290) This PR more nicely handles a missing default branch in owner/repo/branches Fix go-gitea#18265 Signed-off-by: Andrew Thornton <art27@cantab.net>
Gitea version: 1.15.9
The text was updated successfully, but these errors were encountered: