Re: [PATCH] log --format: teach %C(auto,black) to paint it black only on terminals

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

 



On Mon, Dec 17, 2012 at 06:44:10PM +0700, Nguyen Thai Ngoc Duy wrote:

> >                         if (!end)
> >                                 return 0;
> > -                       color_parse_mem(placeholder + 2,
> > -                                       end - (placeholder + 2),
> > +                       if (!memcmp(begin, "auto,", 5)) {
> > +                               if (!want_color(-1))
> > +                                       return end - placeholder + 1;
> 
> This want_color() checks color.ui and only when color.ui = auto, it
> bothers to check if the output is tty. I think the document should say
> that "auto," (or maybe another name because it's not really auto)
> respects color.ui.

Yeah, that should definitely be documented. I wonder if it should
actually respect color.diff, which is what "log" usually uses (albeit
mostly for the diff itself, we have always used it for the graph and for
the "commit" header of each entry).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]