Subject: Re: 'git log' escape symbols shown as ESC[33 and ESC[m

From: Jonathan Nieder <[email-masked]>
Date: Thu, 16 Jan 2014 18:29:21 -0800

Hi,

Jeff King wrote:

> Obviously that does not help the "new unchanged user".  I think we can
> be smarter about guessing whether the pager can actually handle color,
> based on the name.
[...]
> +++ b/pager.c
> @@ -182,3 +182,38 @@ int check_pager_config(const char *cmd)
[...]
> +	/*
> +	 * We know that "more" does not pass through colors at all.
> +	 */
> +	if (!strcmp(pager, "more"))
> +		return 0;

I seem to remember that on some systems "more" is the name of the
full-featured pager that knows how to scroll forward and backward and
handle color.  (My memory could be faulty.  A search in the makefile
for DEFAULT_PAGER=more only finds AIX, which is not the platform I was
thinking of.)

On a stock Debian system "more" is especially primitive, which means
that it passes colors through, too.  It being so primitive also means
it is not a particularly good choice for the PAGER setting, though,
so probably that's not too important.

Hope that helps,
Jonathan