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

Re: Adding color to git diff output.

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 12, 2006, 15:52 UTC
Message-ID
<81b0412b0604120852gaa61e91s5f9ae9f4e061bd56@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0604120846000.14565@g5.osdl.org>
On 4/12/06, Linus Torvalds <torvalds@osdl.org> wrote:
Show 8 quoted lines
> >
> > Maybe use "-t" here? I have at least one system which has no tty installed.
> > Like this:
> >
> >   if [ -n "$GIT_DIFF_PAGER" -a -t ]; then
>
> I assume you mean "-t 1". It needs the FD number. But yes.
>

yes, tpyo (bash doesn't give an error here, btw. Just always 0)

Previous: Linus TorvaldsNext: Junio C Hamano
Message 8 of 9 in “Adding color to git diff output.”
  1. seanApr 11, 2006
  2. Junio C HamanoApr 11, 2006
  3. Linus TorvaldsApr 12, 2006
  4. seanApr 12, 2006
  5. Linus TorvaldsApr 12, 2006
  6. Alex RiesenApr 12, 2006
  7. Linus TorvaldsApr 12, 2006
  8. Alex RiesenApr 12, 2006
  9. Junio C HamanoApr 12, 2006

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.