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

Re: How do I get a readable diff?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2011, 23:17 UTC
Message-ID
<7vsjonbw5i.fsf@alter.siamese.dyndns.org>
In-Reply-To
<YLOHfGzBBJxbxqM1qsJcnw-e9_g2VtXOgnU8xvQ_IlNrU6zqGVsN05yN5fm1zRD8rr_rz_2cO52ZPfqe5_03kZm5DwGQebZf_9jzyEsmGQw@cipher.nrlssc.navy.mil>
Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:
Show 15 quoted lines
> On 08/26/2011 05:42 PM, Bruce Korb wrote:
>> I know I can pipe it through "cat", but I'd rather the clutter be gone.
>> There has to be a way.
>
>> ESC[1mdiff --git a/lustre/include/lustre_disk.h b/lustre/include/lustre_disk.hESC[m
> ...
> Your terminal does not support color.  Are you on an ancient system?
> or something exotic?
>
> You can disable it by setting the color.ui config variable in your
> "user" config file ~/.gitconfig like this:
>
>    git config --global color.ui never
>
> -Brandon

Another possibility is that the user has a LESS environment defined, but without "R" to let it interpret the color. When we do not see "LESS" in the environment, we play nice and give them FRSX, but if the user already has LESS, we assume the user knows better than us and do not touch the environment. Compare:

    $ LESS=N git show
    $ LESS=NR git show
Previous: Brandon Casey
Message 3 of 3 in “How do I get a readable diff?”
  1. Bruce KorbAug 26, 2011
  2. Brandon CaseyAug 26, 2011
  3. Junio C HamanoAug 26, 2011

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.