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

Tab completion when checking out remote branches #177

Closed
sirxyzzy opened this issue Feb 18, 2015 · 8 comments
Closed

Tab completion when checking out remote branches #177

sirxyzzy opened this issue Feb 18, 2015 · 8 comments

Comments

@sirxyzzy
Copy link

I do a fetch with a (Stash based) remote, and see a new remote branch, "origin/bugfix/XXX-999-pdf-to-tiff-quality"

I try "git checkout bugfix/XXX" then tab, nothing completes. I can see why, the branch is not local yet, but git itself would accept "git checkout bugfix/XXX-999-pdf-to-tiff-quality" , I get no completion because git treats branch names in special ways in some cases.

I hope I am just missing something, if not, I'll fork and fix if I can!

@dahlbyk
Copy link
Owner

dahlbyk commented Feb 25, 2015

You're not missing anything - the gitBranches function to look up branch names is not aware that Git will let you checkout remote branches without the remote prefix.

@sirxyzzy
Copy link
Author

Well, I guess I better fix that, unless it is in progress with someone
else, I may be a bit slow, but... yo-ho, yo-ho, it's off to clone I go!

On Wed, Feb 25, 2015 at 3:46 AM, Keith Dahlby notifications@github.com
wrote:

You're not missing anything - the gitBranches function to look up branch
names is not aware that Git will let you checkout remote branches without
the remote prefix.


Reply to this email directly or view it on GitHub
#177 (comment).

@sirxyzzy
Copy link
Author

I think I can see how to fix this, the code is pretty easy to understand,
simpler than I expected, thanks.

On Wed, Feb 25, 2015 at 11:14 AM, Andy Philpotts andy@failfree.net wrote:

Well, I guess I better fix that, unless it is in progress with someone
else, I may be a bit slow, but... yo-ho, yo-ho, it's off to clone I go!

On Wed, Feb 25, 2015 at 3:46 AM, Keith Dahlby notifications@github.com
wrote:

You're not missing anything - the gitBranches function to look up branch
names is not aware that Git will let you checkout remote branches without
the remote prefix.


Reply to this email directly or view it on GitHub
#177 (comment).

@dahlbyk
Copy link
Owner

dahlbyk commented Feb 26, 2015

Glad to hear it. You've probably noticed, but we currently handle checkout along with a larger list of commands that use refs - probably need to separate checkout out from the others.

@sirxyzzy
Copy link
Author

yup, i was adding a specific match as you say, the slightly trickier bit was to figure out unique branch names, as if two remotes use the same name, that must be excluded from the match, i plan to wrap this up tonight, if i can, and am happy to do so, i use posh-git and want to pay back by contributing

Andy

On Feb 26, 2015, at 3:11 PM, Keith Dahlby notifications@github.com wrote:

Glad to hear it. You've probably noticed, but we currently handle checkout along with a larger list of commands that use refs - probably need to separate checkout out from the others.


Reply to this email directly or view it on GitHub.

@dbarrett84
Copy link

Was there a fix made for this???

@petterek
Copy link

petterek commented Nov 8, 2016

Any progress?

@dahlbyk
Copy link
Owner

dahlbyk commented Jan 4, 2017

This was fixed by #352

@dahlbyk dahlbyk closed this as completed Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants