Select Branch to Compare Selects Wrong Branch
See original GitHub issueDescribe the bug
When I click on the Select Branch to Compare dropdown and pick a branch that I want to compare to my current branch, the wrong branch is picked and placed into that field. This only happens in specific repositories, not all. The only way to pick the branch I want is to type it in until the list filters down to the one I want, then select it.
Version & OS
macOS 10.15.5 GitHub Desktop 2.5.2
Steps to reproduce the behavior
Unfortunately, this doesn’t work in every repo and I can’t determine what is exactly causing it in order to make a reproducible example. Currently, this is happening with my work repositories, so I cannot even provide a link to a repo that exhibits the bug or provide a screen capture video.
- Click “Select Branch to Compare”
- Pick a branch
- Notice that the branch that shows up as the selected branch is not the one you chose
- See error
Expected behavior
I would expect the correct branch to be selected
Actual behavior
The wrong branch is selected
Screenshots
Unable to post any unless I can reproduce it in a non-private repository.
Logs
Attach your logs by opening the Help
menu and selecting Show Logs...
, if applicable.
Additional context
It seems to happen with branches that are similarly prefixed. What I’m noticing is happening with my work repositories is that if there are two branches named:
X
XY
Where X and Y can be full words or multiple words
If I select the X
branch, the XY
branch is selected. I don’t think I’ve noticed a case where I pick branch X
and some other branch that doesn’t have X
as a prefix is selected. The weird thing is, I’ve tried recreating this in a new repository, but I am not able to reproduce the bug there. I will update this issue if I can find a way to reproduce it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Thanks for the information @tierninho and @JosephTLyons ! This is a great catch!
I’ve been able to reproduce the issue now! it looks like a race condition between the mouse handlers, going to see if it’s easy to send a quick fix for this.
Hmmm, I’m not sure I had to rename my branches to get it to happen. I think it happened just after creating them. I will say that after encountering this bug for many weeks, I have noticed that it actually doesn’t happen every time. I can get it to happen many times in a row, then randomly it won’t happen. Maybe you were lucky enough to have to work properly in the case where you didn’t rename the branches and have it now work in the case where you did rename the branches.