author | Jeff King <peff@peff.net> | |
Sat, 17 Jan 2009 15:38:46 +0000 (10:38 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 18 Jan 2009 02:04:24 +0000 (18:04 -0800) | ||
commit | c002922adce90b69ac56a86eeb77b249afa88eb2 | |
tree | 7772108654e9729079ebdbac302f76cb272fc977 | tree | snapshot |
parent | 5ef8d77a752884f3c5fad9f143ce5cc72ff1340c | commit | diff |
expand --pretty=format color options
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/pretty-formats.txt | diff | blob | history | |
pretty.c | diff | blob | history | |
t/t6006-rev-list-format.sh | diff | blob | history |