git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 5/7] Documentation/config.txt: describe 'color' value type in the "Values" section

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2015, 21:33 UTC
Message-ID
<1425504803-16039-6-git-send-email-gitster@pobox.com>
In-Reply-To
<1425504803-16039-1-git-send-email-gitster@pobox.com>

Instead of describing it for color.branch.<slot> and have everybody else refer to it, explain how colors are spelled in "Values" section upfront.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/config.txt | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 7be608b..c40bf4a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -146,6 +146,16 @@ integer::
        be suffixed with `k`, `M`,... to mean "scale the number by
        1024", "by 1024x1024", etc.
 
+color::
+       The value for a variables that takes a color is a list of
+       colors (at most two) and attributes (at most one), separated
+       by spaces.  The colors accepted are `normal`, `black`,
+       `red`, `green`, `yellow`, `blue`, `magenta`, `cyan` and
+       `white`; the attributes are `bold`, `dim`, `ul`, `blink` and
+       `reverse`.  The first color given is the foreground; the
+       second is the background.  The position of the attribute, if
+       any, doesn't matter.
+
 
 Variables
 ~~~~~~~~~
@@ -838,14 +848,6 @@ color.branch.<slot>::
 	`remote` (a remote-tracking branch in refs/remotes/),
 	`upstream` (upstream tracking branch), `plain` (other
 	refs).
-+
-The value for these configuration variables is a list of colors (at most
-two) and attributes (at most one), separated by spaces.  The colors
-accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`,
-`magenta`, `cyan` and `white`; the attributes are `bold`, `dim`, `ul`,
-`blink` and `reverse`.  The first color given is the foreground; the
-second is the background.  The position of the attribute, if any,
-doesn't matter.
 
 color.diff::
 	Whether to use ANSI escape sequences to add color to patches.
@@ -865,8 +867,7 @@ color.diff.<slot>::
 	of `plain` (context text), `meta` (metainformation), `frag`
 	(hunk header), 'func' (function in hunk header), `old` (removed lines),
 	`new` (added lines), `commit` (commit headers), or `whitespace`
-	(highlighting whitespace errors). The values of these variables may be
-	specified as in color.branch.<slot>.
+	(highlighting whitespace errors).
 
 color.decorate.<slot>::
 	Use customized color for 'git log --decorate' output.  `<slot>` is one
@@ -899,8 +900,6 @@ color.grep.<slot>::
 	separators between fields on a line (`:`, `-`, and `=`)
 	and between hunks (`--`)
 --
-+
-The values of these variables may be specified as in color.branch.<slot>.
 
 color.interactive::
 	When set to `always`, always use colors for interactive prompts
@@ -913,8 +912,7 @@ color.interactive.<slot>::
 	Use customized color for 'git add --interactive' and 'git clean
 	--interactive' output. `<slot>` may be `prompt`, `header`, `help`
 	or `error`, for four distinct types of normal output from
-	interactive commands.  The values of these variables may be
-	specified as in color.branch.<slot>.
+	interactive commands.
 
 color.pager::
 	A boolean to enable/disable colored output when the pager is in
@@ -940,8 +938,7 @@ color.status.<slot>::
 	`untracked` (files which are not tracked by Git),
 	`branch` (the current branch), or
 	`nobranch` (the color the 'no branch' warning is shown in, defaulting
-	to red). The values of these variables may be specified as in
-	color.branch.<slot>.
+	to red).
 
 color.ui::
 	This variable determines the default value for variables such
-- 
2.3.1-316-g7c93423
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “[Q] should "color.*.<slot> = normal" emit nothing?”
  1. Junio C HamanoFeb 18, 2015
  2. log --decorate: do not leak "commit" color into the next itemJunio C Hamano, Feb 18, 2015
  3. Jeff KingFeb 18, 2015
  4. Junio C HamanoFeb 19, 2015
  5. Jeff KingFeb 20, 2015
  6. Junio C HamanoFeb 20, 2015
  7. Jeff KingFeb 21, 2015
  8. Junio C HamanoFeb 21, 2015
  9. 0/7 Fix leak of color/attributes in "git log --decorate"Junio C Hamano, Mar 4, 2015
  10. 1/7 Documentation/config.txt: avoid unnecessary negationJunio C Hamano, Mar 4, 2015
  11. 2/7 Documentation/config.txt: explain multi-valued variables onceJunio C Hamano, Mar 4, 2015
  12. 3/7 Documentation/config.txt: describe the structure first and then meaningJunio C Hamano, Mar 4, 2015
  13. 4/7 Documentation/config.txt: have a separate "Values" sectionJunio C Hamano, Mar 4, 2015
  14. 5/7 Documentation/config.txt: describe 'color' value type in the "Values" sectionJunio C Hamano, Mar 4, 2015
  15. 6/7 Documentation/config.txt: simplify boolean description in the syntax sectionJunio C Hamano, Mar 4, 2015
  16. 7/7 log --decorate: do not leak "commit" color into the next itemJunio C Hamano, Mar 4, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.