On Fri, Jan 30, 2009 at 01:21:00PM -0700, Elijah Newren wrote: > Whenever I try to load the output in perl, git won't show the > colorization. I guess I could manually add it when I am printing the > information, but it'd be nicer to just have git do the colorization > despite the fact that its output is not a tty. Is there an easy way > to do that (without mucking with the user's config file)? > > (It looks like eg status is also affected, for similar reasons.) If you pass --color on the command line, it is equivalent to "color = always" (whereas the default is "auto", which turns it on only if output is to a tty). So you would have to read color.diff yourself and then decide whether to add --color. Note that in general you are playing things a bit risky with these sorts of outputs. You are calling porcelain (like log and status) and piping it into your program. There's no guarantee that user config might not be affecting the results of those programs. But I think that is sort of the nature of "eg": to be a thin wrapper around git. So maybe it is OK for your use. -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