Re: Pretty format color bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think you've found a "bug" or unexpected feature, but it's not in git,
but in your pager.

Try:
     PAGER=cat git log --pretty=format:'%h%Cred%+d test'

Interesting, cat works correctly.
But this still fails for me:
PAGER=cat git log --pretty=format:'%h%Cred%+d test' --graph

The pipe symbol printed (because of --graph) for the second line is colored and resets the color of the refnames and 'test'.
Now this looks like a bug in git?

I'm assuming you're using "less" and are about to read about its
behavior of resetting colors that are still in effect when it hits a
newline.

There is a section (-R) that mentions less assumes every line starts normal / uncolored. Shouldn't git follow this assumption when printing colorized to less?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux