]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-config.txt
Docs: Use "-l::\n--long\n" format in OPTIONS sections
[thirdparty/git.git] / Documentation / git-config.txt
index 7640450787064aac7211b5a3d5504275b62119ff..c90421ee7f3b6a3fe1f08c4868b5652d4d7db569 100644 (file)
@@ -21,6 +21,7 @@ SYNOPSIS
 'git-config' [<file-option>] --remove-section name
 'git-config' [<file-option>] [-z|--null] -l | --list
 'git-config' [<file-option>] --get-color name [default]
+'git-config' [<file-option>] --get-colorbool name [stdout-is-tty]
 
 DESCRIPTION
 -----------
@@ -100,7 +101,8 @@ rather than from all available files.
 +
 See also <<FILES>>.
 
--f config-file, --file config-file::
+-f config-file::
+--file config-file::
        Use the given config file instead of the one specified by GIT_CONFIG.
 
 --remove-section::
@@ -115,7 +117,8 @@ See also <<FILES>>.
 --unset-all::
        Remove all lines matching the key from config file.
 
--l, --list::
+-l::
+--list::
        List all variables set in config file.
 
 --bool::
@@ -127,14 +130,26 @@ See also <<FILES>>.
        in the config file will cause the value to be multiplied
        by 1024, 1048576, or 1073741824 prior to output.
 
--z, --null::
+-z::
+--null::
        For all options that output values and/or keys, always
-       end values with with the null character (instead of a
+       end values 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.
 
+--get-colorbool name [stdout-is-tty]::
+
+       Find the color setting for `name` (e.g. `color.diff`) and output
+       "true" or "false".  `stdout-is-tty` should be either "true" or
+       "false", and is taken into account when configuration says
+       "auto".  If `stdout-is-tty` is missing, then checks the standard
+       output of the command itself, and exits with status 0 if color
+       is to be used, or exits with status 1 otherwise.
+       When the color setting for `name` is undefined, the command uses
+       `color.ui` as fallback.
+
 --get-color name default::
 
        Find the color configured for `name` (e.g. `color.diff.new`) and
@@ -322,4 +337,4 @@ Documentation by Johannes Schindelin, Petr Baudis and the git-list <git@vger.ker
 
 GIT
 ---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[1] suite