From: René Scharfe Date: Sun, 18 Jan 2009 17:13:21 GMT Subject: Re: [PATCH 2/2] expand --pretty=format color options Message-ID: <49736331.8010003@lsrfire.ath.cx> In-Reply-To: <20090117153846.GB27071@coredump.intra.peff.net> Jeff King schrieb: > Currently, the only colors available to --pretty=format > users are red, green, and blue. Rather than expand it with a > few new colors, this patch makes the usual config color > syntax available, including more colors, backgrounds, and > attributes. > > Because colors are no longer bounded to a single word (e.g., > %Cred), this uses a more advanced syntax that features a > beginning and end delimiter (but the old syntax still > works). So you can now do: > > git log --pretty=tformat:'%C(yellow)%h%C(reset) %s' > > to emulate --pretty=oneline, or even > > git log --pretty=tformat:'%C(cyan magenta bold)%s%C(reset)' > > if you want to relive the awesomeness of 4-color CGA. > > Signed-off-by: Jeff King > --- > René: I saw you mention an end goal of implementing the other --pretty > formats in terms of --pretty=format:. So maybe this will help just a > little. Nice! Another step would be for --pretty=format to respect the color config, i.e. it shouldn't print any colour codes if colouring is turned off or if set to auto while writing to file or pipe. René