git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git's config core.pager doesn't respect color.pager

From
BKBenjamin Kudria <ben@kudria.net>
Date
Jul 23, 2008, 02:10 UTC
Message-ID
<d129c0140807221910j37f40e72se9f411d6424077de@mail.gmail.com>

I'm seeing a problem with git. It's easier to demonstrate than explain. The relevant parts of my .gitconfig:

[core]
	pager = tig
[color]
	diff = auto
	pager = false

tig is a console-based git client that can also act as a pager, colorizing git output.

So, with the above config, when I do:
git diff | tig

Everything works correctly - git sends no color codes, because of color.pager = false.

However, if I do just:
git diff

git uses core.pager to display the output, but still sends color codes, which is OK for, say, less, bit not so good for tig, which does it's own colorizing, and displays the color codes git sends as-is.

Shouldn't core.pager respect color.pager, and not send the color codes?
Benjamin Kudria
-- 
http://ben.kudria.net | Jabber: ben@kudria.net
Next: Jeff King
Message 1 of 2 in “Git's config core.pager doesn't respect color.pager”
  1. Benjamin KudriaJul 23, 2008
  2. Jeff KingJul 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.