Re: `git stash --help` tries to pull up nonexistent file gitstack.html
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 12, 2016, 16:25 UTC
- Message-ID
- <CAPc5daXicjUDi6B-MA8Sn=_UZ_jHvc8SE4ZXt2dHbbDQkD7=WA@mail.gmail.com>
- In-Reply-To
- <CAKRjdd4V3OfDnzisxBofBUmtds7q7ejUtuV_-s96eUVf7fqwHA@mail.gmail.com>
On Fri, Aug 12, 2016 at 9:15 AM, Joseph Musser <me@jnm2.com> wrote:
> Oh, I'm embarrassed. The typo was mine, I must have typed `git stack > --help`. I would have expected a syntax error message or "did you > mean" suggestions; it didn't even enter my mind that it would look up > whatever I typed before --help and assume it existed on disk.
I actually think you found an interesting (albeit minor) bug. I think whenever "git" sees any word followed by "--help" and nothing else, it blindly turns it into "git help" followed by that word. I think it is reasonable to expect that "git foo --help" responds with "foo: no such subcommand", instead of "No manual entry for gitfoo".
It may not be too hard to arrange; this might be another low-hanging fruit if somebody wants to try a patch ;-)
Thanks.