Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-11-20 15:24:18 +0300
committerJunio C Hamano <junkio@cox.net>2005-11-20 21:53:06 +0300
commitf98d863d2122e1b8781dfb9889df98876a26f315 (patch)
tree3b688c9ff010bd74cde0027fe63f1d225a53b0ab /Documentation
parenta6322d079b1d2e2cb72da1271171b35a173f3d22 (diff)
git-config-set: support selecting values by non-matching regex
Extend the regex syntax of value_regex so that prepending an exclamation mark means non-match: [core] quetzal = "Dodo" for Brainf*ck quetzal = "T. Rex" for Malbolge quetzal = "cat" You can match the third line with git-config-set --get quetzal '! for ' Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-config-set.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/Documentation/git-config-set.txt b/Documentation/git-config-set.txt
index c707fbcf99..bfbd42147a 100644
--- a/Documentation/git-config-set.txt
+++ b/Documentation/git-config-set.txt
@@ -22,7 +22,9 @@ actually the section and the key separated by a dot, and the value will be
escaped.
If you want to set/unset an option which can occor on multiple lines, you
-should provide a POSIX regex for the value.
+should provide a POSIX regex for the value. If you want to handle the lines
+*not* matching the regex, just prepend a single exlamation mark in front
+(see EXAMPLES).
This command will fail if
@@ -82,6 +84,7 @@ Given a .git/config like this:
command="ssh" for "ssh://kernel.org/"
command="proxy-command" for kernel.org
command="myprotocol-command" for "my://"
+ command=default-proxy ; for all the rest
you can set the filemode to true with
@@ -139,6 +142,19 @@ new one with
% git config-set --replace-all proxy.command ssh
------------
+However, if you really only want to replace the line for the default proxy,
+i.e. the one without a "for ..." postfix, do something like this:
+
+------------
+% git config-set proxy.command ssh '! for '
+------------
+
+To actually match only values with an exclamation mark, you have to
+
+------------
+% git config-set section.key value '[!]'
+------------
+
Author
------