Re: [PATCH 4/4] allow recovery from command name typos
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 9, 2012, 17:03 UTC
- Message-ID
- <7vwr4lthfo.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CALUzUxpF0zn0V89BcayavbVs6muuXPv4+eYWgCWJn90hj6s6hQ@mail.gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
Show 11 quoted lines
> Actually, I've never heard of that feature, until I was reading help.c. > > However, it's listed on Progit [1], so I'd imagine there'd be *some* > users in the wild. > > [1] http://git-scm.com/book/ch7-1.html > > Personally, I think it's a little dangerous - imagine your script has > a typo'd command that just runs anyway if help.autocorrect without any > chance for user intervention. Perhaps there should be a isatty(2) > check to guard it, like the prompting patch does.
The whole "did you mean one of these" autocorrection should trigger only in interactive to begin with, I would have thought. Are you saying that we don't have isatty(3) check in the early in the codepath already?
In any case, we drifted into a tangent without seeing the patch series to completion. Are you rerolling with Peff's fixups, Peff hinted he is willing to do a re-post, and are you counting on it, or should I just pick up the pieces?
Thanks.