Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git checkout <Tab> tab-completion shows duplicated branch entries for branches that exist also on the remote #505

Closed
bergmeister opened this issue Dec 10, 2017 · 2 comments · Fixed by #512

Comments

@bergmeister
Copy link
Contributor

bergmeister commented Dec 10, 2017

System Details

  • posh-git version/path: 0.7.1 C:\Program Files\WindowsPowerShell\Modules\posh-git\0.7.1
  • PowerShell version: 5.1.16299.98
  • git version 2.15.0.windows.1
  • OS: Microsoft Windows NT 10.0.16299.0
  • default settings, no customisation of posh-git

Issue Description

Given a Git repo with branch B1 being locally and on the remote upstream and branch B2 being only locally and trying to tab complete as follows:

git checkout B<Tab>

Expected Result

Tab completion should show 2 branches to tab complete

B1 B2

Actual Result

Branches that exist locally and on the remote are shown twice:

B1 B1 B2

@bergmeister bergmeister changed the title git branch -b <Tab> tab-completion shows duplicated branch entries for branches that exist also on the remote git branch <Tab> tab-completion shows duplicated branch entries for branches that exist also on the remote Dec 10, 2017
@bergmeister bergmeister changed the title git branch <Tab> tab-completion shows duplicated branch entries for branches that exist also on the remote git checkout <Tab> tab-completion shows duplicated branch entries for branches that exist also on the remote Dec 10, 2017
@dahlbyk
Copy link
Owner

dahlbyk commented Dec 12, 2017

Good catch! If someone wants to take a crack at fixing this, it should be as simple as concatenating these results and adding a Sort-Object -Unique.

@bergmeister
Copy link
Contributor Author

bergmeister commented Dec 12, 2017

Thanks for the pointer, very helpful. That's exactly how open source should be. :-)
I opened PR 506 with a fix for it. When do you expect the next release to be?

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

Successfully merging a pull request may close this issue.

2 participants