]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/rev-list.c
rev-list: pass diffopt->use_colors through to pretty-print
authorJeff King <peff@peff.net>
Thu, 13 Jul 2017 15:07:30 +0000 (11:07 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jul 2017 19:42:51 +0000 (12:42 -0700)
commitd75dfb1089d471501f6042341bed647525f6e293
treed5a3a8a8816152fb24ebe31328f19d1d5d2e949c
parentd8b68686a4cc8a486823dd356ed4dba0e51536ea
rev-list: pass diffopt->use_colors through to pretty-print

When rev-list pretty-prints a commit, it creates a new
pretty_print_context and copies items from the rev_info
struct. We don't currently copy the "use_color" field,
though. Nobody seems to have noticed because the only part
of pretty.c that cares is the %C(auto,...) placeholder, and
presumably not many people use that with the rev-list
plumbing (as opposed to with git-log).

It will become more noticeable in a future patch, though,
when we start treating all user-format colors as auto-colors
(in which case it would become impossible to format colors
with rev-list, even with --color=always).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rev-list.c
t/t6006-rev-list-format.sh