Tay Ray Chuan <rctay89@xxxxxxxxx> writes: > On Thu, Jul 26, 2012 at 1:57 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> >> Tay Ray Chuan <rctay89@xxxxxxxxx> writes: >> >> > 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html