Skip to content

Commit 5f7b91b

Browse files
committed
Documentation/config.txt: have a separate "Values" section
The various types of values set to the configuration variables deserve more than a brief footnote mention in the syntax section, and it will be more so after the later steps of this clean up effort. Move the mention of booleans from the syntax section to this new section, and describe how human-readble integers can be spelled with scaling there. Signed-off-by: Junio C Hamano <[email protected]>
1 parent ff5507e commit 5f7b91b

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

Documentation/config.txt

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ The following escape sequences (beside `\"` and `\\`) are recognized:
7575
and `\b` for backspace (BS). No other char escape sequence, nor octal
7676
char sequences are valid.
7777

78-
The values following the equals sign in variable assign are all either
79-
a string, an integer, or a boolean. Boolean values may be given as yes/no,
80-
1/0, true/false or on/off. Case is not significant in boolean values, when
81-
converting value to the canonical form using '--bool' type specifier;
82-
'git config' will ensure that the output is "true" or "false".
83-
84-
Some variables may require a special value format.
85-
8678

8779
Includes
8880
~~~~~~~~
@@ -124,6 +116,37 @@ Example
124116
path = foo ; expand "foo" relative to the current file
125117
path = ~/foo ; expand "foo" in your $HOME directory
126118

119+
120+
Values
121+
~~~~~~
122+
123+
Values of many variables are treated as a simple string, but there
124+
are variables that take values of specific types and there are rules
125+
as to how to spell them.
126+
127+
boolean::
128+
129+
When a variable is said to take a boolean value, many
130+
synonyms are accepted for 'true' and 'false'; these are all
131+
case-insensitive.
132+
133+
true;; Boolean true can be spelled as `yes`, `on`, `true`,
134+
or `1`. Also, a variable defined without `= <value>`
135+
is taken as true.
136+
137+
false;; Boolean false can be spelled as `no`, `off`,
138+
`false`, or `0`.
139+
+
140+
When converting value to the canonical form using '--bool' type
141+
specifier; 'git config' will ensure that the output is "true" or
142+
"false" (spelled in lowercase).
143+
144+
integer::
145+
The value for many variables that specify various sizes can
146+
be suffixed with `k`, `M`,... to mean "scale the number by
147+
1024", "by 1024x1024", etc.
148+
149+
127150
Variables
128151
~~~~~~~~~
129152

0 commit comments

Comments
 (0)