git-number icon indicating copy to clipboard operation
git-number copied to clipboard

git number doesn't work anymore with placeholder numbers

Open rcdailey opened this issue 11 years ago • 3 comments

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.

rcdailey avatar Feb 27 '14 21:02 rcdailey

The invocation should be like this:

$ git number checkout 1

Anything that comes after -- are passed verbatim

holygeek avatar Feb 27 '14 22:02 holygeek

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.

rcdailey avatar Feb 27 '14 23:02 rcdailey

You got a point there.

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

holygeek avatar Mar 03 '14 12:03 holygeek