git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Cc: Bruce Korb <bruce.korb@gmail.com>, GIT Development <git@vger.kernel.org>
Subject: Re: How do I get a readable diff?
Date: Fri, 26 Aug 2011 16:17:13 -0700	[thread overview]
Message-ID: <7vsjonbw5i.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <YLOHfGzBBJxbxqM1qsJcnw-e9_g2VtXOgnU8xvQ_IlNrU6zqGVsN05yN5fm1zRD8rr_rz_2cO52ZPfqe5_03kZm5DwGQebZf_9jzyEsmGQw@cipher.nrlssc.navy.mil> (Brandon Casey's message of "Fri, 26 Aug 2011 17:58:32 -0500")

Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:

> 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

      reply	other threads:[~2011-08-26 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 22:42 How do I get a readable diff? Bruce Korb
2011-08-26 22:58 ` Brandon Casey
2011-08-26 23:17   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vsjonbw5i.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=brandon.casey.ctr@nrlssc.navy.mil \
    --cc=bruce.korb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).