Documentation fixes in git-config
Variable names must start with an alphabetic character, regexp config key matching has its limits, sentence grammar. Signed-off-by: Libor Pechacek <lpechacek@suse.cz> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Libor Pechacek committed
Mar 1, 2012 at 11:59 UTC
e0a4aae865862549c5f2a65016d4d264843e7914
2 files changed
+12
-7
Documentation/config.txt
+7
-5
@@ -12,8 +12,9 @@ The configuration variables are used by both the git plumbing
12
and the porcelains. The variables are divided into sections, wherein
13
the fully qualified variable name of the variable itself is the last
14
dot-separated segment and the section name is everything before the last
15
-dot. The variable names are case-insensitive and only alphanumeric
16
-characters are allowed. Some variables may appear multiple times.
15
+dot. The variable names are case-insensitive, allow only alphanumeric
16
+characters and `-`, and must start with an alphabetic character. Some
17
+variables may appear multiple times.
18
19
Syntax
20
~~~~~~
@@ -54,9 +55,10 @@ All the other lines (and the remainder of the line after the section
55
header) are recognized as setting variables, in the form
56
'name = value'. If there is no equal sign on the line, the entire line
57
is taken as 'name' and the variable is recognized as boolean "true".
57
-The variable names are case-insensitive and only alphanumeric
58
-characters and `-` are allowed. There can be more than one value
59
-for a given variable; we say then that variable is multivalued.
58
+The variable names are case-insensitive, allow only alphanumeric characters
59
+and `-`, and must start with an alphabetic character. There can be more
60
+than one value for a given variable; we say then that the variable is
61
+multivalued.
62
63
Leading and trailing whitespace in a variable value is discarded.
64
Internal whitespace within a variable value is retained verbatim.
Documentation/git-config.txt
+5
-2
@@ -85,8 +85,11 @@ OPTIONS
85
is not exactly one.
86
87
--get-regexp::
88
- Like --get-all, but interprets the name as a regular expression.
89
- Also outputs the key names.
88
+ Like --get-all, but interprets the name as a regular expression and
89
+ writes out the key names. Regular expression matching is currently
90
+ case-sensitive and done against a canonicalized version of the key
91
+ in which section and variable names are lowercased, but subsection
92
+ names are not.
93
94
--global::
95
For writing options: write to global ~/.gitconfig file rather than