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 <gitster@pobox.com>
Junio C Hamano committed
Mar 4, 2015 at 10:57 UTC
5f7b91baca0693e80fa9230a2008107aa4779743
1 file changed
+31
-8
Documentation/config.txt
+31
-8
@@ -75,14 +75,6 @@ The following escape sequences (beside `\"` and `\\`) are recognized:
75
and `\b` for backspace (BS). No other char escape sequence, nor octal
76
char sequences are valid.
77
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
-
78
79
Includes
80
~~~~~~~~
@@ -124,6 +116,37 @@ Example
116
path = foo ; expand "foo" relative to the current file
117
path = ~/foo ; expand "foo" in your $HOME directory
118
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
+
150
Variables
151
~~~~~~~~~
152