diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:01 -0700 |
commit | 1b3d14c1c89d8ad61be97a1f2d2606a07b25872b (patch) | |
tree | 1a3748c688b22878c33e90db84e827418656ea46 /pretty.c | |
parent | 3807098cd6abf4b94b6e0326255e5f5f0577f975 (diff) | |
parent | b15a3e005af07843116c73205742adfbab3d2e82 (diff) | |
download | git-1b3d14c1c89d8ad61be97a1f2d2606a07b25872b.tar.gz |
Merge branch 'et/pretty-format-c-auto'
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); |