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 number doesn't work anymore with placeholder numbers #12

Open
rcdailey opened this issue Feb 27, 2014 · 3 comments
Open

git number doesn't work anymore with placeholder numbers #12

rcdailey opened this issue Feb 27, 2014 · 3 comments

Comments

@rcdailey
Copy link

After new changes to allow argument passthrough for git number -s, I can't check out files anymore using numbers:

$ git number checkout -- 1
error: pathspec '1' did not match any file(s) known to git.
@holygeek
Copy link
Owner

The invocation should be like this:

$ git number checkout 1

Anything that comes after -- are passed verbatim

@rcdailey
Copy link
Author

That's not going to work. What if I'm trying to check out a file that has the same name as one of my branches?

"--" is now ambiguous in this case. It's accepted by both git-number and git-checkout as valid parameters. Basically I want to pass in the "--" literally to the git subcommand. So maybe you could choose a different symbol for your "literal passthrough" that doesn't clash with git's accepted version?

Maybe do this instead:

$ git number -s ++ -b

Which will allow me to do this:

$ git number checkout -- 1

And since you use ++, you won't parse out the -- and it will work the same as before.

@holygeek
Copy link
Owner

holygeek commented Mar 3, 2014

You got a point there.

The option parsing code in git-number and git-id definitely need rework.

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

No branches or pull requests

2 participants