diff options
author | Jeff King <peff@peff.net> | 2014-01-16 23:24:50 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-17 11:17:45 -0800 |
commit | 425729a45fb3a99efbd627258ab1b782bb69d5f4 (patch) | |
tree | 74f07e250fdaa353100c491f574b486a50e54ac6 /git-instaweb.sh | |
parent | f545750c690880de6ec74280a2c703983a0834fc (diff) | |
download | git-jk/color-for-more-pagers.tar.gz |
pager: disable colors for some known-bad configurationsjk/color-for-more-pagers
Some pagers do not like the ANSI colors we print. It used to
be that one had to opt into the colors, and you would
usually check your pager config at the same time. These
days, we turn on color.ui by default, meaning that some
users may see broken "git log" from the start, before they
have configured anything. They can fix it by turning off
"color.pager", but we should try to make things work
out-of-the-box as much as possible.
The common cause of this is that the user is using "less" or
"more", has setup its config variable in the environment (so
that we do not override it), but has not included "R" in
their config.
For other pagers, we simply continue to guess that the pager
can handle it. This is compatible with the current behavior
(and will keep exotic things like "diff-highlight | less"
working without further config). The downside is that other
random pagers may break.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-instaweb.sh')
0 files changed, 0 insertions, 0 deletions