Wrong label on branch dropdown #1542

Closed
opened 2025-11-02 04:04:27 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @vbrandl on GitHub (Feb 17, 2018).

  • Gitea version (or commit ref): 1.3.2
  • Git version: 2.11.0
  • Operating system: Debian 9
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

https://try.gitea.io/foobar42/test-repository

Description

When pushing a non-default branch (e.g. everything except master) to an empty repository, the dropdown menu for branch selection is wrongly labeled master. The dropdown menu shows the correct branches.

On further investigation I noticed that the link to the commits for the current branches links to https://try.gitea.io/foobar42/test-repository/commits/branch/master which produces a 404 error.

Also visiting the branches overview (https://try.gitea.io/foobar42/test-repository/branches/) lists master as default branch (which does not exist) but does not list the develop branch.

In general it seems like the UI gets confused when there is only one branch which at the same time is not the default branch.

Screenshots

Originally created by @vbrandl on GitHub (Feb 17, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.3.2 - Git version: 2.11.0 - Operating system: Debian 9 - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant https://try.gitea.io/foobar42/test-repository ## Description When pushing a non-default branch (e.g. everything except `master`) to an empty repository, the dropdown menu for branch selection is wrongly labeled `master`. The dropdown menu shows the correct branches. On further investigation I noticed that the link to the commits for the current branches links to https://try.gitea.io/foobar42/test-repository/commits/branch/master which produces a 404 error. Also visiting the branches overview (https://try.gitea.io/foobar42/test-repository/branches/) lists `master` as default branch (which does not exist) but does not list the `develop` branch. In general it seems like the UI gets confused when there is only one branch which at the same time is not the default branch. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![](https://screenshotscdn.firefoxusercontent.com/images/7db18d81-edd5-4358-9903-5e1fca62ba09.png)
GiteaMirror added the type/bug label 2025-11-02 04:04:27 -06:00
Author
Owner

@lunny commented on GitHub (Feb 20, 2018):

should be fixed by #3190

@lunny commented on GitHub (Feb 20, 2018): ~should be fixed by #3190~
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1542