diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-06-27 09:56:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-27 09:56:23 -0700 |
commit | fbb4138cb2e6b77d1d8386f336e7813fcfd3cb02 (patch) | |
tree | 0cb026bfefb9cb551f1e61d6ca857640d530e870 /pretty.c | |
parent | 0a20325a01d089d8274aa4be05d79e6c157e1319 (diff) | |
parent | b15a3e005af07843116c73205742adfbab3d2e82 (diff) | |
download | git-fbb4138cb2e6b77d1d8386f336e7813fcfd3cb02.tar.gz |
Merge branch 'et/pretty-format-c-auto' into maint
The commands in `git log` family take %C(auto) in a custom format
string. This unconditionally turned the color on, ignoring
--no-color or with --color=auto when the output is not connected to
a tty; this was corrected to make the format truly behave as
"auto".
* et/pretty-format-c-auto:
format_commit_message: honor `color=auto` for `%C(auto)`
Diffstat (limited to 'pretty.c')
-rw-r--r-- | pretty.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1063,7 +1063,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ switch (placeholder[0]) { case 'C': if (starts_with(placeholder + 1, "(auto)")) { - c->auto_color = 1; + c->auto_color = want_color(c->pretty_ctx->color); return 7; /* consumed 7 bytes, "C(auto)" */ } else { int ret = parse_color(sb, placeholder, c); |