Skip to content

Commit 0a7839e

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent 328e629 commit 0a7839e

File tree

2 files changed

+202
-201
lines changed

2 files changed

+202
-201
lines changed

Documentation/config.txt

Lines changed: 1 addition & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -309,207 +309,7 @@ include::config/checkout.txt[]
309309

310310
include::config/clean.txt[]
311311

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[]
513313

514314
column.ui::
515315
Specify whether supported commands should output in columns.

0 commit comments

Comments
 (0)