Re: [PATCH 1/4] diff-highlight: add `less -r` to cmd in README
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 3, 2015, 21:51 UTC
- Message-ID
- <xmqqwptybvk5.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20151103211435.GA22484@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I agree with Junio that "-R" is a more sensible default, but I don't > think that should be necessary. We already set LESS when running the > pager (and if you are overriding it, you are already in trouble, because > git itself will generate ANSI codes by default).
I do not quite understand this part. Inside git itself when we spawn the pager we export LESS with a sensible default, exactly to help users who do not have LESS set and exported. This one however is not spawned by git but the end-user piping output of diff-hilite.
I agree that if the user has LESS exported without -R that would not be pretty while viewing coloured output.