Skip to content

Commit 76de71b

Browse files
committed
Merge branch 'ah/doc-pretty-color-auto-prefix' into maint
Doc update. * ah/doc-pretty-color-auto-prefix: doc: clarify syntax for %C(auto,...) in pretty formats
2 parents cf77911 + 8592c95 commit 76de71b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Documentation/pretty-formats.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,12 @@ endif::git-rev-list[]
174174
- '%Creset': reset color
175175
- '%C(...)': color specification, as described under Values in the
176176
"CONFIGURATION FILE" section of linkgit:git-config[1];
177-
adding `auto,` at the beginning will emit color only when colors are
178-
enabled for log output (by `color.diff`, `color.ui`, or `--color`, and
179-
respecting the `auto` settings of the former if we are going to a
180-
terminal). `auto` alone (i.e. `%C(auto)`) will turn on auto coloring
181-
on the next placeholders until the color is switched again.
177+
adding `auto,` at the beginning (e.g. `%C(auto,red)`) will emit
178+
color only when colors are enabled for log output (by `color.diff`,
179+
`color.ui`, or `--color`, and respecting the `auto` settings of the
180+
former if we are going to a terminal). `auto` alone (i.e.
181+
`%C(auto)`) will turn on auto coloring on the next placeholders
182+
until the color is switched again.
182183
- '%m': left (`<`), right (`>`) or boundary (`-`) mark
183184
- '%n': newline
184185
- '%%': a raw '%'

0 commit comments

Comments
 (0)