git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jay Soffian <jaysoffian@gmail.com>
Date
Jan 28, 2009, 14:26 UTC
Message-ID
<76718490901280626j2caa6ebbgf98c76d8419191c7@mail.gmail.com>
In-Reply-To
<7vd4e8xdva.fsf@gitster.siamese.dyndns.org>
On Tue, Jan 27, 2009 at 11:18 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Jay Soffian <jaysoffian@gmail.com> writes:
>
>> 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.
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 8 in “git-am: emit usage when called w/o arguments and w/o patch on stdin”
  1. 1/2 git-am: emit usage when called w/o arguments and w/o patch on stdinJay Soffian, Jan 28, 2009
  2. 2/2 git-am: minor cleanupsJay Soffian, Jan 28, 2009
  3. Junio C HamanoJan 28, 2009
  4. Jay SoffianJan 28, 2009
  5. Junio C HamanoJan 28, 2009
  6. Sverre RabbelierJan 28, 2009
  7. Jay SoffianJan 28, 2009
  8. Junio C HamanoJan 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.