Skip to content

Commit e0a4aae

Browse files
Libor Pechacekgitster
authored andcommitted
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 <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b0fa280 commit e0a4aae

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Documentation/config.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ The configuration variables are used by both the git plumbing
1212
and the porcelains. The variables are divided into sections, wherein
1313
the fully qualified variable name of the variable itself is the last
1414
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.
1718

1819
Syntax
1920
~~~~~~
@@ -54,9 +55,10 @@ All the other lines (and the remainder of the line after the section
5455
header) are recognized as setting variables, in the form
5556
'name = value'. If there is no equal sign on the line, the entire line
5657
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.
6062

6163
Leading and trailing whitespace in a variable value is discarded.
6264
Internal whitespace within a variable value is retained verbatim.

Documentation/git-config.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ OPTIONS
8585
is not exactly one.
8686

8787
--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.
9093

9194
--global::
9295
For writing options: write to global ~/.gitconfig file rather than

0 commit comments

Comments
 (0)