500 when viewing a repo without a master branch #1355

Closed
opened 2025-11-02 03:57:40 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @yatesco on GitHub (Dec 13, 2017).

Originally assigned to: @lunny on GitHub.

  • Gitea version (or commit ref): gitea/gitea:latest pulled yesterday
  • Git version:git version 2.13.6 (Apple Git-96)
  • Operating system: macos
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

gitea throws a 500 if you view a repository without a master branch

To reproduce:

  • install a fresh gitea
  • create a new repo
  • git push -u origin some-other-branch
  • then view the repo in gitea and it throws a 500

P.S> - Loving gitea - thanks for everyone's hard work!

Originally created by @yatesco on GitHub (Dec 13, 2017). Originally assigned to: @lunny on GitHub. - Gitea version (or commit ref): gitea/gitea:latest pulled yesterday - Git version:git version 2.13.6 (Apple Git-96) - Operating system: macos - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: ## Description `gitea` throws a `500` if you view a repository without a master branch To reproduce: - install a fresh gitea - create a new repo - `git push -u origin some-other-branch` - then view the repo in gitea and it throws a 500 P.S> - Loving `gitea` - thanks for everyone's hard work!
GiteaMirror added the type/bug label 2025-11-02 03:57:40 -06:00
Author
Owner

@lunny commented on GitHub (Dec 15, 2017):

Because /HEAD is ref: refs/heads/master but there is no master branch.

@lunny commented on GitHub (Dec 15, 2017): Because <repo>/HEAD is `ref: refs/heads/master` but there is no `master` branch.
Author
Owner

@lunny commented on GitHub (Dec 20, 2017):

resolved by #3240

@lunny commented on GitHub (Dec 20, 2017): resolved by #3240
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1355