Re: `git stash --help` tries to pull up nonexistent file gitstack.html
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 12, 2016, 18:14 UTC
- Message-ID
- <CA+P7+xp7rpVRWgAXTe9sHN9=a+T+x0SnQPUCrR5_E9Qpufo6=Q@mail.gmail.com>
- In-Reply-To
- <CAPc5daXicjUDi6B-MA8Sn=_UZ_jHvc8SE4ZXt2dHbbDQkD7=WA@mail.gmail.com>
On Fri, Aug 12, 2016 at 9:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> 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 ;-) >
What about extension subcommands that aren't core? Wouldn't we prefer if it still tried to find help for those also? Just a thought to add to this.
Thanks, Jake