Skip to content

Commit 4f193f2

Browse files
distorted-mdwJunio C Hamano
authored andcommitted
Documentation/config.txt: Fix documentation of colour config tweaks.
* The description of valid colour specifications was rather incomplete, so fix it so that it actually describes colour specs as accepted by color_parse(). * The list of colour items allowed in color.diff.BLAH was missing the `commit' and `whitespace' entries. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent c3e821c commit 4f193f2

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

Documentation/config.txt

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,29 @@ color.branch.<slot>::
250250
Use customized color for branch coloration. `<slot>` is one of
251251
`current` (the current branch), `local` (a local branch),
252252
`remote` (a tracking branch in refs/remotes/), `plain` (other
253-
refs), or `reset` (the normal terminal color). The value for
254-
these configuration variables can be one of: `normal`, `bold`,
255-
`dim`, `ul`, `blink`, `reverse`, `reset`, `black`, `red`,
256-
`green`, `yellow`, `blue`, `magenta`, `cyan`, or `white`.
253+
refs).
254+
+
255+
The value for these configuration variables is a list of colors (at most
256+
two) and attributes (at most one), separated by spaces. The colors
257+
accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`,
258+
`magenta`, `cyan` and `white`; the attributes are `bold`, `dim`, `ul`,
259+
`blink` and `reverse`. The first color given is the foreground; the
260+
second is the background. The position of the attribute, if any,
261+
doesn't matter.
257262

258263
color.diff::
259264
When true (or `always`), always use colors in patch.
260265
When false (or `never`), never. When set to `auto`, use
261266
colors only when the output is to the terminal.
262267

263268
color.diff.<slot>::
264-
Use customized color for diff colorization. `<slot>`
265-
specifies which part of the patch to use the specified
266-
color, and is one of `plain` (context text), `meta`
267-
(metainformation), `frag` (hunk header), `old` (removed
268-
lines), or `new` (added lines). The values of these
269-
variables may be specified as in color.branch.<slot>.
269+
Use customized color for diff colorization. `<slot>` specifies
270+
which part of the patch to use the specified color, and is one
271+
of `plain` (context text), `meta` (metainformation), `frag`
272+
(hunk header), `old` (removed lines), `new` (added lines),
273+
`commit` (commit headers), or `whitespace` (highlighting dubious
274+
whitespace). The values of these variables may be specified as
275+
in color.branch.<slot>.
270276

271277
color.pager::
272278
A boolean to enable/disable colored output when the pager is in

0 commit comments

Comments
 (0)