Re: [PATCH] pretty.c: Make user defined format honor color option

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

 



On 03/17/2011 10:39 AM, Will Palmer schrobtete:
> On Thu, 2011-03-17 at 09:33 +0100, Thomas Egerer wrote:
>> This patch fixes that the pretty-formats tformat and format ignore
>> git's color option.
> 
> It is my understanding that this is intentional, the logic being: If you
> normally don't want color, but have specified it directly on the
> command-line, you probably want color.
I'm using the pretty format in the context of an alias. My global setting
for colors is auto. I would expect git to not disregard this options. I
usually use the alias to display a git log in a modified way, but I also
do sometimes pipe it to grep. If there was a way to suppress output
colorization (let's say by not using global options but the command line
switch --color=never) that would work for me. But there is no wa and I
find it inconvinient to have two different aliases doing the same thing
one with color and one without while there would be a much simpler way.

> iirc, there are a couple of other places beyond log-tree.c which need to
> propagate COLOR_DIFF into the pretty context if you want to respect the
> colour option in user-specified formats. Skimming my own diffs:
> rev-list.c and shortlog.c
You're right. If there's a chance to bring this upstream, I would include
it in a revised versoin of my patch.

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