Merge branch 'jc/format-color-auto'

Introduce "log --format=%C(auto,blue)Foo%C(auto,reset)" that does
not color its output when writing to a non-terminal.

* jc/format-color-auto:
  log --format: teach %C(auto,black) to respect color config
  t6006: clean up whitespace
This commit is contained in:
Junio C Hamano
2013-01-05 23:41:57 -08:00
5 changed files with 76 additions and 8 deletions

View File

@ -671,6 +671,7 @@ void show_log(struct rev_info *opt)
ctx.preserve_subject = opt->preserve_subject;
ctx.reflog_info = opt->reflog_info;
ctx.fmt = opt->commit_format;
ctx.color = opt->diffopt.use_color;
pretty_print_commit(&ctx, commit, &msgbuf);
if (opt->add_signoff)