diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:41:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:41:57 -0800 |
commit | 946a5aee3e896aa12cb9d4d21079c6e299baad81 (patch) | |
tree | 86bc33d1262dfec0a36bbca5b0825298189bb710 /Documentation | |
parent | d2638e1561012e0f5b473ab43ef76c4ff0d12a9f (diff) | |
parent | 30825178fb72e3664bd1bda7c02c62e300e2e5ce (diff) | |
download | git-946a5aee3e896aa12cb9d4d21079c6e299baad81.tar.gz git-946a5aee3e896aa12cb9d4d21079c6e299baad81.tar.xz |
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
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/pretty-formats.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index d9eddedc7..105f18a6f 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -144,7 +144,11 @@ The placeholders are: - '%Cgreen': switch color to green - '%Cblue': switch color to blue - '%Creset': reset color -- '%C(...)': color specification, as described in color.branch.* config option +- '%C(...)': color specification, as described in color.branch.* config option; + adding `auto,` at the beginning will emit color only when colors are + enabled for log output (by `color.diff`, `color.ui`, or `--color`, and + respecting the `auto` settings of the former if we are going to a + terminal) - '%m': left, right or boundary mark - '%n': newline - '%%': a raw '%' |