desktop / desktop

Focus on what matters instead of fighting with Git.
https://desktop.github.com
MIT License
19.67k stars 9.39k forks source link

Request: favor the branch name that exactly matches search input #8621

Closed zeke closed 4 years ago

zeke commented 4 years ago

I often copy branch names directly from the GitHub.com pull request page:


Screen Shot 2019-11-12 at 8 12 48 AM


Then I open Desktop so I can switch to that branch locally:

Screen Shot 2019-11-12 at 8 11 27 AM

Because I am pasting the exact name of the branch name, I don't stop to look and see if the first selected result is my branch name. I am blindly confident that the right branch will be the top result, because it's the exact name of the branch.

However, in this case, Desktop is giving preference not to the remote branch that I want to switch to, but instead to a local branch that partially matches my input. This got me into trouble, and I ended up committing and pushing my work to the wrong branch.

The ask: if there's a remote branch whose name is an exact match to what has been entered in the input, that branch should be selected by default.

billygriffin commented 4 years ago

Hi @zeke! Have you ever used the "Open this pull request in Desktop" link?

Screen Shot 2019-11-12 at 1 26 59 PM

I think your request is still valid, but we also always group recent branches above others so this would represent a departure from that paradigm and I'm not positive the benefit is worth potentially confusing people. Thoughts?

zeke commented 4 years ago

Have you ever used the "Open this pull request in Desktop" link?

🙈 I forgot this existed! Very useful. 👍

I'm not positive the benefit is worth potentially confusing people

You're probably right. Just wanted to bring it up because it caused minor confusion. Feel free to close!