config.txt: move color.* to a separate file

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Oct 27, 2018 at 08:22 UTC 0a7839e3ccbfed4b3eff7e1e80ae24bbc23cf1ca
2 files changed +202 -201
Documentation/config.txt
+1 -201
@@ -309,207 +309,7 @@ include::config/checkout.txt[]
309
310 include::config/clean.txt[]
311
312 -color.advice::
313 - A boolean to enable/disable color in hints (e.g. when a push
314 - failed, see `advice.*` for a list). May be set to `always`,
315 - `false` (or `never`) or `auto` (or `true`), in which case colors
316 - are used only when the error output goes to a terminal. If
317 - unset, then the value of `color.ui` is used (`auto` by default).
318 -
319 -color.advice.hint::
320 - Use customized color for hints.
321 -
322 -color.blame.highlightRecent::
323 - This can be used to color the metadata of a blame line depending
324 - on age of the line.
325 -+
326 -This setting should be set to a comma-separated list of color and date settings,
327 -starting and ending with a color, the dates should be set from oldest to newest.
328 -The metadata will be colored given the colors if the the line was introduced
329 -before the given timestamp, overwriting older timestamped colors.
330 -+
331 -Instead of an absolute timestamp relative timestamps work as well, e.g.
332 -2.weeks.ago is valid to address anything older than 2 weeks.
333 -+
334 -It defaults to 'blue,12 month ago,white,1 month ago,red', which colors
335 -everything older than one year blue, recent changes between one month and
336 -one year old are kept white, and lines introduced within the last month are
337 -colored red.
338 -
339 -color.blame.repeatedLines::
340 - Use the customized color for the part of git-blame output that
341 - is repeated meta information per line (such as commit id,
342 - author name, date and timezone). Defaults to cyan.
343 -
344 -color.branch::
345 - A boolean to enable/disable color in the output of
346 - linkgit:git-branch[1]. May be set to `always`,
347 - `false` (or `never`) or `auto` (or `true`), in which case colors are used
348 - only when the output is to a terminal. If unset, then the
349 - value of `color.ui` is used (`auto` by default).
350 -
351 -color.branch.<slot>::
352 - Use customized color for branch coloration. `<slot>` is one of
353 - `current` (the current branch), `local` (a local branch),
354 - `remote` (a remote-tracking branch in refs/remotes/),
355 - `upstream` (upstream tracking branch), `plain` (other
356 - refs).
357 -
358 -color.diff::
359 - Whether to use ANSI escape sequences to add color to patches.
360 - If this is set to `always`, linkgit:git-diff[1],
361 - linkgit:git-log[1], and linkgit:git-show[1] will use color
362 - for all patches. If it is set to `true` or `auto`, those
363 - commands will only use color when output is to the terminal.
364 - If unset, then the value of `color.ui` is used (`auto` by
365 - default).
366 -+
367 -This does not affect linkgit:git-format-patch[1] or the
368 -'git-diff-{asterisk}' plumbing commands. Can be overridden on the
369 -command line with the `--color[=<when>]` option.
370 -
371 -color.diff.<slot>::
372 - Use customized color for diff colorization. `<slot>` specifies
373 - which part of the patch to use the specified color, and is one
374 - of `context` (context text - `plain` is a historical synonym),
375 - `meta` (metainformation), `frag`
376 - (hunk header), 'func' (function in hunk header), `old` (removed lines),
377 - `new` (added lines), `commit` (commit headers), `whitespace`
378 - (highlighting whitespace errors), `oldMoved` (deleted lines),
379 - `newMoved` (added lines), `oldMovedDimmed`, `oldMovedAlternative`,
380 - `oldMovedAlternativeDimmed`, `newMovedDimmed`, `newMovedAlternative`
381 - `newMovedAlternativeDimmed` (See the '<mode>'
382 - setting of '--color-moved' in linkgit:git-diff[1] for details),
383 - `contextDimmed`, `oldDimmed`, `newDimmed`, `contextBold`,
384 - `oldBold`, and `newBold` (see linkgit:git-range-diff[1] for details).
385 -
386 -color.decorate.<slot>::
387 - Use customized color for 'git log --decorate' output. `<slot>` is one
388 - of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
389 - branches, remote-tracking branches, tags, stash and HEAD, respectively
390 - and `grafted` for grafted commits.
391 -
392 -color.grep::
393 - When set to `always`, always highlight matches. When `false` (or
394 - `never`), never. When set to `true` or `auto`, use color only
395 - when the output is written to the terminal. If unset, then the
396 - value of `color.ui` is used (`auto` by default).
397 -
398 -color.grep.<slot>::
399 - Use customized color for grep colorization. `<slot>` specifies which
400 - part of the line to use the specified color, and is one of
401 -+
402 ---
403 -`context`;;
404 - non-matching text in context lines (when using `-A`, `-B`, or `-C`)
405 -`filename`;;
406 - filename prefix (when not using `-h`)
407 -`function`;;
408 - function name lines (when using `-p`)
409 -`lineNumber`;;
410 - line number prefix (when using `-n`)
411 -`column`;;
412 - column number prefix (when using `--column`)
413 -`match`;;
414 - matching text (same as setting `matchContext` and `matchSelected`)
415 -`matchContext`;;
416 - matching text in context lines
417 -`matchSelected`;;
418 - matching text in selected lines
419 -`selected`;;
420 - non-matching text in selected lines
421 -`separator`;;
422 - separators between fields on a line (`:`, `-`, and `=`)
423 - and between hunks (`--`)
424 ---
425 -
426 -color.interactive::
427 - When set to `always`, always use colors for interactive prompts
428 - and displays (such as those used by "git-add --interactive" and
429 - "git-clean --interactive"). When false (or `never`), never.
430 - When set to `true` or `auto`, use colors only when the output is
431 - to the terminal. If unset, then the value of `color.ui` is
432 - used (`auto` by default).
433 -
434 -color.interactive.<slot>::
435 - Use customized color for 'git add --interactive' and 'git clean
436 - --interactive' output. `<slot>` may be `prompt`, `header`, `help`
437 - or `error`, for four distinct types of normal output from
438 - interactive commands.
439 -
440 -color.pager::
441 - A boolean to enable/disable colored output when the pager is in
442 - use (default is true).
443 -
444 -color.push::
445 - A boolean to enable/disable color in push errors. May be set to
446 - `always`, `false` (or `never`) or `auto` (or `true`), in which
447 - case colors are used only when the error output goes to a terminal.
448 - If unset, then the value of `color.ui` is used (`auto` by default).
449 -
450 -color.push.error::
451 - Use customized color for push errors.
452 -
453 -color.remote::
454 - If set, keywords at the start of the line are highlighted. The
455 - keywords are "error", "warning", "hint" and "success", and are
456 - matched case-insensitively. May be set to `always`, `false` (or
457 - `never`) or `auto` (or `true`). If unset, then the value of
458 - `color.ui` is used (`auto` by default).
459 -
460 -color.remote.<slot>::
461 - Use customized color for each remote keyword. `<slot>` may be
462 - `hint`, `warning`, `success` or `error` which match the
463 - corresponding keyword.
464 -
465 -color.showBranch::
466 - A boolean to enable/disable color in the output of
467 - linkgit:git-show-branch[1]. May be set to `always`,
468 - `false` (or `never`) or `auto` (or `true`), in which case colors are used
469 - only when the output is to a terminal. If unset, then the
470 - value of `color.ui` is used (`auto` by default).
471 -
472 -color.status::
473 - A boolean to enable/disable color in the output of
474 - linkgit:git-status[1]. May be set to `always`,
475 - `false` (or `never`) or `auto` (or `true`), in which case colors are used
476 - only when the output is to a terminal. If unset, then the
477 - value of `color.ui` is used (`auto` by default).
478 -
479 -color.status.<slot>::
480 - Use customized color for status colorization. `<slot>` is
481 - one of `header` (the header text of the status message),
482 - `added` or `updated` (files which are added but not committed),
483 - `changed` (files which are changed but not added in the index),
484 - `untracked` (files which are not tracked by Git),
485 - `branch` (the current branch),
486 - `nobranch` (the color the 'no branch' warning is shown in, defaulting
487 - to red),
488 - `localBranch` or `remoteBranch` (the local and remote branch names,
489 - respectively, when branch and tracking information is displayed in the
490 - status short-format), or
491 - `unmerged` (files which have unmerged changes).
492 -
493 -color.transport::
494 - A boolean to enable/disable color when pushes are rejected. May be
495 - set to `always`, `false` (or `never`) or `auto` (or `true`), in which
496 - case colors are used only when the error output goes to a terminal.
497 - If unset, then the value of `color.ui` is used (`auto` by default).
498 -
499 -color.transport.rejected::
500 - Use customized color when a push was rejected.
501 -
502 -color.ui::
503 - This variable determines the default value for variables such
504 - as `color.diff` and `color.grep` that control the use of color
505 - per command family. Its scope will expand as more commands learn
506 - configuration to set a default for the `--color` option. Set it
507 - to `false` or `never` if you prefer Git commands not to use
508 - color unless enabled explicitly with some other configuration
509 - or the `--color` option. Set it to `always` if you want all
510 - output not intended for machine consumption to use color, to
511 - `true` or `auto` (this is the default since Git 1.8.4) if you
512 - want such output to use color when written to the terminal.
312 +include::config/color.txt[]
313
314 column.ui::
315 Specify whether supported commands should output in columns.
Documentation/config/color.txt new
+201
@@ -0,0 +1,201 @@
1 +color.advice::
2 + A boolean to enable/disable color in hints (e.g. when a push
3 + failed, see `advice.*` for a list). May be set to `always`,
4 + `false` (or `never`) or `auto` (or `true`), in which case colors
5 + are used only when the error output goes to a terminal. If
6 + unset, then the value of `color.ui` is used (`auto` by default).
7 +
8 +color.advice.hint::
9 + Use customized color for hints.
10 +
11 +color.blame.highlightRecent::
12 + This can be used to color the metadata of a blame line depending
13 + on age of the line.
14 ++
15 +This setting should be set to a comma-separated list of color and date settings,
16 +starting and ending with a color, the dates should be set from oldest to newest.
17 +The metadata will be colored given the colors if the the line was introduced
18 +before the given timestamp, overwriting older timestamped colors.
19 ++
20 +Instead of an absolute timestamp relative timestamps work as well, e.g.
21 +2.weeks.ago is valid to address anything older than 2 weeks.
22 ++
23 +It defaults to 'blue,12 month ago,white,1 month ago,red', which colors
24 +everything older than one year blue, recent changes between one month and
25 +one year old are kept white, and lines introduced within the last month are
26 +colored red.
27 +
28 +color.blame.repeatedLines::
29 + Use the customized color for the part of git-blame output that
30 + is repeated meta information per line (such as commit id,
31 + author name, date and timezone). Defaults to cyan.
32 +
33 +color.branch::
34 + A boolean to enable/disable color in the output of
35 + linkgit:git-branch[1]. May be set to `always`,
36 + `false` (or `never`) or `auto` (or `true`), in which case colors are used
37 + only when the output is to a terminal. If unset, then the
38 + value of `color.ui` is used (`auto` by default).
39 +
40 +color.branch.<slot>::
41 + Use customized color for branch coloration. `<slot>` is one of
42 + `current` (the current branch), `local` (a local branch),
43 + `remote` (a remote-tracking branch in refs/remotes/),
44 + `upstream` (upstream tracking branch), `plain` (other
45 + refs).
46 +
47 +color.diff::
48 + Whether to use ANSI escape sequences to add color to patches.
49 + If this is set to `always`, linkgit:git-diff[1],
50 + linkgit:git-log[1], and linkgit:git-show[1] will use color
51 + for all patches. If it is set to `true` or `auto`, those
52 + commands will only use color when output is to the terminal.
53 + If unset, then the value of `color.ui` is used (`auto` by
54 + default).
55 ++
56 +This does not affect linkgit:git-format-patch[1] or the
57 +'git-diff-{asterisk}' plumbing commands. Can be overridden on the
58 +command line with the `--color[=<when>]` option.
59 +
60 +color.diff.<slot>::
61 + Use customized color for diff colorization. `<slot>` specifies
62 + which part of the patch to use the specified color, and is one
63 + of `context` (context text - `plain` is a historical synonym),
64 + `meta` (metainformation), `frag`
65 + (hunk header), 'func' (function in hunk header), `old` (removed lines),
66 + `new` (added lines), `commit` (commit headers), `whitespace`
67 + (highlighting whitespace errors), `oldMoved` (deleted lines),
68 + `newMoved` (added lines), `oldMovedDimmed`, `oldMovedAlternative`,
69 + `oldMovedAlternativeDimmed`, `newMovedDimmed`, `newMovedAlternative`
70 + `newMovedAlternativeDimmed` (See the '<mode>'
71 + setting of '--color-moved' in linkgit:git-diff[1] for details),
72 + `contextDimmed`, `oldDimmed`, `newDimmed`, `contextBold`,
73 + `oldBold`, and `newBold` (see linkgit:git-range-diff[1] for details).
74 +
75 +color.decorate.<slot>::
76 + Use customized color for 'git log --decorate' output. `<slot>` is one
77 + of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
78 + branches, remote-tracking branches, tags, stash and HEAD, respectively
79 + and `grafted` for grafted commits.
80 +
81 +color.grep::
82 + When set to `always`, always highlight matches. When `false` (or
83 + `never`), never. When set to `true` or `auto`, use color only
84 + when the output is written to the terminal. If unset, then the
85 + value of `color.ui` is used (`auto` by default).
86 +
87 +color.grep.<slot>::
88 + Use customized color for grep colorization. `<slot>` specifies which
89 + part of the line to use the specified color, and is one of
90 ++
91 +--
92 +`context`;;
93 + non-matching text in context lines (when using `-A`, `-B`, or `-C`)
94 +`filename`;;
95 + filename prefix (when not using `-h`)
96 +`function`;;
97 + function name lines (when using `-p`)
98 +`lineNumber`;;
99 + line number prefix (when using `-n`)
100 +`column`;;
101 + column number prefix (when using `--column`)
102 +`match`;;
103 + matching text (same as setting `matchContext` and `matchSelected`)
104 +`matchContext`;;
105 + matching text in context lines
106 +`matchSelected`;;
107 + matching text in selected lines
108 +`selected`;;
109 + non-matching text in selected lines
110 +`separator`;;
111 + separators between fields on a line (`:`, `-`, and `=`)
112 + and between hunks (`--`)
113 +--
114 +
115 +color.interactive::
116 + When set to `always`, always use colors for interactive prompts
117 + and displays (such as those used by "git-add --interactive" and
118 + "git-clean --interactive"). When false (or `never`), never.
119 + When set to `true` or `auto`, use colors only when the output is
120 + to the terminal. If unset, then the value of `color.ui` is
121 + used (`auto` by default).
122 +
123 +color.interactive.<slot>::
124 + Use customized color for 'git add --interactive' and 'git clean
125 + --interactive' output. `<slot>` may be `prompt`, `header`, `help`
126 + or `error`, for four distinct types of normal output from
127 + interactive commands.
128 +
129 +color.pager::
130 + A boolean to enable/disable colored output when the pager is in
131 + use (default is true).
132 +
133 +color.push::
134 + A boolean to enable/disable color in push errors. May be set to
135 + `always`, `false` (or `never`) or `auto` (or `true`), in which
136 + case colors are used only when the error output goes to a terminal.
137 + If unset, then the value of `color.ui` is used (`auto` by default).
138 +
139 +color.push.error::
140 + Use customized color for push errors.
141 +
142 +color.remote::
143 + If set, keywords at the start of the line are highlighted. The
144 + keywords are "error", "warning", "hint" and "success", and are
145 + matched case-insensitively. May be set to `always`, `false` (or
146 + `never`) or `auto` (or `true`). If unset, then the value of
147 + `color.ui` is used (`auto` by default).
148 +
149 +color.remote.<slot>::
150 + Use customized color for each remote keyword. `<slot>` may be
151 + `hint`, `warning`, `success` or `error` which match the
152 + corresponding keyword.
153 +
154 +color.showBranch::
155 + A boolean to enable/disable color in the output of
156 + linkgit:git-show-branch[1]. May be set to `always`,
157 + `false` (or `never`) or `auto` (or `true`), in which case colors are used
158 + only when the output is to a terminal. If unset, then the
159 + value of `color.ui` is used (`auto` by default).
160 +
161 +color.status::
162 + A boolean to enable/disable color in the output of
163 + linkgit:git-status[1]. May be set to `always`,
164 + `false` (or `never`) or `auto` (or `true`), in which case colors are used
165 + only when the output is to a terminal. If unset, then the
166 + value of `color.ui` is used (`auto` by default).
167 +
168 +color.status.<slot>::
169 + Use customized color for status colorization. `<slot>` is
170 + one of `header` (the header text of the status message),
171 + `added` or `updated` (files which are added but not committed),
172 + `changed` (files which are changed but not added in the index),
173 + `untracked` (files which are not tracked by Git),
174 + `branch` (the current branch),
175 + `nobranch` (the color the 'no branch' warning is shown in, defaulting
176 + to red),
177 + `localBranch` or `remoteBranch` (the local and remote branch names,
178 + respectively, when branch and tracking information is displayed in the
179 + status short-format), or
180 + `unmerged` (files which have unmerged changes).
181 +
182 +color.transport::
183 + A boolean to enable/disable color when pushes are rejected. May be
184 + set to `always`, `false` (or `never`) or `auto` (or `true`), in which
185 + case colors are used only when the error output goes to a terminal.
186 + If unset, then the value of `color.ui` is used (`auto` by default).
187 +
188 +color.transport.rejected::
189 + Use customized color when a push was rejected.
190 +
191 +color.ui::
192 + This variable determines the default value for variables such
193 + as `color.diff` and `color.grep` that control the use of color
194 + per command family. Its scope will expand as more commands learn
195 + configuration to set a default for the `--color` option. Set it
196 + to `false` or `never` if you prefer Git commands not to use
197 + color unless enabled explicitly with some other configuration
198 + or the `--color` option. Set it to `always` if you want all
199 + output not intended for machine consumption to use color, to
200 + `true` or `auto` (this is the default since Git 1.8.4) if you
201 + want such output to use color when written to the terminal.