Re: [PATCH v3 1/2] add interface for /dev/tty interaction

2012-08-06 Thread Jeff King
On Sun, Aug 05, 2012 at 01:11:47PM -0700, Junio C Hamano wrote: Tay Ray Chuan rcta...@gmail.com writes: Factor out the opening and closing of /dev/tty from git_terminal_prompt(), so that callers may first test if a controlling terminal is available before proceeding with prompting

[PATCH v3 1/2] add interface for /dev/tty interaction

2012-08-05 Thread Tay Ray Chuan
Factor out the opening and closing of /dev/tty from git_terminal_prompt(), so that callers may first test if a controlling terminal is available before proceeding with prompting proper. When HAVE_DEV_TTY is not defined, terminal_open() falls back to checking tty-ness of stdin and stderr, as