Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Going to the repository root shows wrong branch name in selection menu #441

Open
gerarts opened this issue Apr 28, 2017 · 2 comments
Open
Assignees

Comments

@gerarts
Copy link

gerarts commented Apr 28, 2017

Visiting the repository shows the branch that was last pushed to in the menu on the right, but the contents of the master branch. Since these don't match up it makes for some confusion when checking if a push was successful.

pasted_image_at_2017_04_28_01_35_pm

Edit: This happens when going to the repository root (for example by clicking on Commits in the menu on the left)

@jwgmeligmeyling
Copy link
Member

jwgmeligmeyling commented May 1, 2017

We either change master to refs/heads/master in ProjectResource.java#L92 so that its not incorrectly matched to any other branch matching **master in JGitRepositoryFacade.java#L157, or we should replace the endsWith(String) with an equals(String) comparison. The cleanest solution seems to be to prepend refs/heads/ if its not given, and then use an equals comparison instead. I think that's what Git is supposed to do under the hood too. But I am not certain what the side effects would be, as I remember that the branch prefix differs for bare and non-bare repositories. The git-server mostly uses bare-repositories, but not always. @LiamClark What do you think?

@jwgmeligmeyling
Copy link
Member

jwgmeligmeyling commented May 1, 2017

See also the commit devhub-tud/git-server@ac08538 which kind of proves the point we have been struggling with a related issue before (as it was included in a hotfix release).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants