Skip to content

Commit 512aba2

Browse files
peffgitster
authored andcommitted
document behavior of empty color name
Commit 55cccf4 (color_parse_mem: allow empty color spec, 2017-02-01) clearly defined the behavior of an empty color config variable. Let's document that, and give a hint about why it might be useful. It's important not to say that it makes the item uncolored, because it doesn't. It just sets no attributes, which means that any previous attributes continue to take effect. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 55cccf4 commit 512aba2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Documentation/config.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ The position of any attributes with respect to the colors
170170
be turned off by prefixing them with `no` or `no-` (e.g., `noreverse`,
171171
`no-ul`, etc).
172172
+
173+
An empty color string produces no color effect at all. This can be used
174+
to avoid coloring specific elements without disabling color entirely.
175+
+
173176
For git's pre-defined color slots, the attributes are meant to be reset
174177
at the beginning of each item in the colored output. So setting
175178
`color.decorate.branch` to `black` will paint that branch name in a

0 commit comments

Comments
 (0)