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