Thread (16 messages) flat view 16 messages, 2 authors, 2016-06-15

Re: [PATCH v2] Documentation fixes in git-config

From: Jeff King <hidden>
Date: 2016-06-15 22:50:26

On Fri, Jan 21, 2011 at 11:25:37AM +0100, Libor Pechacek wrote:
Variable names must start with an alphabetic character, regexp config key
matching has its limits.
I think this is fine, although:
 --get-regexp::
-	Like --get-all, but interprets the name as a regular expression.
-	Also outputs the key names.
+	Like --get-all, but interprets the name as a regular expression and
+	writes out the key names.  Regular expression matching is currently
+	case-sensitive and done against a canonicalized version of the key
+	in which section and variable names are lowercased, but subsection
+	names are not.  Regular expressions are partially lower-cased
+	before matching (everything before the first dot and after the last
+	dot), which makes things like "Core.*' work.
I am half-tempted to mark the lowercasing of the regex as deprecated (or
at least discouraged). It's such a hack, and I don't think we will ever
improve to make it work in the general case, as regexes are simply too
complex for us to handle all possible inputs.

Either way, though, this is definitely an improvement over what is
there, so:

Acked-by: Jeff King <redacted>

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help