From: Junio C Hamano Date: Fri, 20 Mar 2015 20:50:51 +0000 (-0700) Subject: Merge branch 'jc/decorate-leaky-separator-color' X-Git-Tag: v2.4.0-rc0~29 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5f456b3c2612dce9cbc3ba4864dd0e5fdf429cac Merge branch 'jc/decorate-leaky-separator-color' "git log --decorate" did not reset colors correctly around the branch names. * jc/decorate-leaky-separator-color: log --decorate: do not leak "commit" color into the next item Documentation/config.txt: simplify boolean description in the syntax section Documentation/config.txt: describe 'color' value type in the "Values" section Documentation/config.txt: have a separate "Values" section Documentation/config.txt: describe the structure first and then meaning Documentation/config.txt: explain multi-valued variables once Documentation/config.txt: avoid unnecessary negation --- 5f456b3c2612dce9cbc3ba4864dd0e5fdf429cac diff --cc Documentation/config.txt index 35a5198856,6d65033e44..5666d27b4a --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -78,13 -72,9 +72,9 @@@ must be escaped: use `\"` for `"` and ` The following escape sequences (beside `\"` and `\\`) are recognized: `\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB) -and `\b` for backspace (BS). No other char escape sequence, nor octal -char sequences are valid. +and `\b` for backspace (BS). Other char escape sequences (including octal +escape sequences) are invalid. - Variable values ending in a `\` are continued on the next line in the - customary UNIX fashion. - - Some variables may require a special value format. Includes ~~~~~~~~ @@@ -126,6 -116,54 +116,60 @@@ Exampl path = foo ; expand "foo" relative to the current file path = ~/foo ; expand "foo" in your $HOME directory + + Values + ~~~~~~ + + Values of many variables are treated as a simple string, but there + are variables that take values of specific types and there are rules + as to how to spell them. + + boolean:: + + When a variable is said to take a boolean value, many + synonyms are accepted for 'true' and 'false'; these are all + case-insensitive. + + true;; Boolean true can be spelled as `yes`, `on`, `true`, + or `1`. Also, a variable defined without `= ` + is taken as true. + + false;; Boolean false can be spelled as `no`, `off`, + `false`, or `0`. + + + When converting value to the canonical form using '--bool' type + specifier; 'git config' will ensure that the output is "true" or + "false" (spelled in lowercase). + + integer:: + The value for many variables that specify various sizes can + 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. ++ any, doesn't matter. Attributes may be turned off specifically ++ by prefixing them with `no` (e.g., `noreverse`, `noul`, etc). +++ ++Colors (foreground and background) may also be given as numbers between ++0 and 255; these use ANSI 256-color mode (but note that not all ++terminals may support this). If your terminal supports it, you may also ++specify 24-bit RGB values as hex, like `#ff0ab3`. + + + The attributes are meant to be reset at the beginning of each item + in the colored output, so setting color.decorate.branch to `black` + will paint that branch name in a plain `black`, even if the previous + thing on the same output line (e.g. opening parenthesis before the + list of branch names in `log --decorate` output) is set to be + painted with `bold` or some other attribute. + + Variables ~~~~~~~~~ @@@ -956,12 -943,9 +982,10 @@@ color.status.: `added` or `updated` (files which are added but not committed), `changed` (files which are changed but not added in the index), `untracked` (files which are not tracked by Git), - `branch` (the current branch), or + `branch` (the current branch), `nobranch` (the color the 'no branch' warning is shown in, defaulting - to red). + to red), or + `unmerged` (files which have unmerged changes). - The values of these variables may be specified as in - color.branch.. color.ui:: This variable determines the default value for variables such