Re: [PATCH v2 2/2] git-am: minor cleanups

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 2/2] git-am: minor cleanups

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:03

Jay Soffian [off-list ref] writes:
Use "test -t 0" instead of deprecated "tty -s" to detect when stdin is a
terminal.
Who deprecated it?

Other changes looked sensible, though.

Re: [PATCH v2 2/2] git-am: minor cleanups

From: Jay Soffian <hidden>
Date: 2016-06-15 22:46:03

On Tue, Jan 27, 2009 at 11:18 PM, Junio C Hamano [off-list ref] wrote:
Jay Soffian [off-list ref] writes:
quoted
Use "test -t 0" instead of deprecated "tty -s" to detect when stdin is a
terminal.
Who deprecated it?
I believe it's IEEE Std 1003.2-1992 / POSIX.2. I found the initial
reference in the BSD/OS X man page[1], but google also found me other
references [2,3]. Also, elsewhere git uses "test -t 0", not "tty -s".

[1] http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man1/tty.1.html
    (The -s option is deprecated in favor of the ``test -t 0'' command.)
[2] http://docs.sun.com/app/docs/doc/816-5165/tty-1?a=view
    (Portable applications should use test -t.)
[3] http://opengroup.org/onlinepubs/007908799/xcu/tty.html
    (Portable applications should use test -t 0.)

j.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help