Tay Ray Chuan [off-list ref] writes:
On Thu, Jul 26, 2012 at 1:57 AM, Junio C Hamano [off-list ref] wrote:
quoted
Tay Ray Chuan [off-list ref] writes:
quoted
If suggestions are available (based on Levenshtein distance) and if the
terminal isatty(), present a prompt to the user to select one of the
computed suggestions.
The way to determine "If the terminal is a tty" used in this patch
looks overly dangerous, given that we do not know what kind of "git"
command we may be invoking at this point.
Indeed, it should also have considered stdin's tty-ness.
Not necessarily. As long as you call git_prompt(), which opens
/dev/tty on its own and does not break even if its standard input is
coming from elsewhere, you should be OK.