Git's config core.pager doesn't respect color.pager
- From
- Benjamin 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