Code

Merge branch 'fl/config'
[git.git] / Documentation / git-config.txt
index f2c67176f451483abdbe862fd5d1cc8fe6b67aac..5f66a7fcd5907b26ff6bdf94b53c2619c1eff509 100644 (file)
@@ -9,16 +9,17 @@ git-config - Get and set repository or global options
 SYNOPSIS
 --------
 [verse]
-'git-config' [--system | --global] name [value [value_regex]]
-'git-config' [--system | --global] --add name value
-'git-config' [--system | --global] --replace-all name [value [value_regex]]
-'git-config' [--system | --global] [type] --get name [value_regex]
-'git-config' [--system | --global] [type] --get-all name [value_regex]
+'git-config' [--system | --global] [type] [-z|--null] name [value [value_regex]]
+'git-config' [--system | --global] [type] --add name value
+'git-config' [--system | --global] [type] --replace-all name [value [value_regex]]
+'git-config' [--system | --global] [type] [-z|--null] --get name [value_regex]
+'git-config' [--system | --global] [type] [-z|--null] --get-all name [value_regex]
+'git-config' [--system | --global] [type] [-z|--null] --get-regexp name_regex [value_regex]
 'git-config' [--system | --global] --unset name [value_regex]
 'git-config' [--system | --global] --unset-all name [value_regex]
 'git-config' [--system | --global] --rename-section old_name new_name
 'git-config' [--system | --global] --remove-section name
-'git-config' [--system | --global] -l | --list
+'git-config' [--system | --global] [-z|--null] -l | --list
 
 DESCRIPTION
 -----------
@@ -36,8 +37,7 @@ prepend a single exclamation mark in front (see also <<EXAMPLES>>).
 The type specifier can be either '--int' or '--bool', which will make
 'git-config' ensure that the variable(s) are of the given type and
 convert the value to the canonical form (simple decimal number for int,
-a "true" or "false" string for bool).  Type specifiers currently only
-take effect for reading operations.  If no type specifier is passed,
+a "true" or "false" string for bool).  If no type specifier is passed,
 no checks or transformations are performed on the value.
 
 This command will fail if:
@@ -73,6 +73,7 @@ OPTIONS
 
 --get-regexp::
        Like --get-all, but interprets the name as a regular expression.
+       Also outputs the key names.
 
 --global::
        For writing options: write to global ~/.gitconfig file rather than
@@ -116,6 +117,14 @@ See also <<FILES>>.
        in the config file will cause the value to be multiplied
        by 1024, 1048576, or 1073741824 prior to output.
 
+-z, --null::
+       For all options that output values and/or keys, always
+       end values with with the null character (instead of a
+       newline). Use newline instead as a delimiter between
+       key and value. This allows for secure parsing of the
+       output without getting confused e.g. by values that
+       contain line breaks.
+
 
 [[FILES]]
 FILES