From: Junio C Hamano Date: Thu, 1 Mar 2012 22:45:14 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.7.10-rc0~27 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/797166cfafb516a713fa442bfc0411a7d2e131e3?ds=inline;hp=-c Merge branch 'maint' * maint: Documentation fixes in git-config --- 797166cfafb516a713fa442bfc0411a7d2e131e3 diff --combined Documentation/config.txt index e55dae1806,a7a6dc071d..5367ba9cae --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -12,8 -12,9 +12,9 @@@ The configuration variables are used b and the porcelains. The variables are divided into sections, wherein the fully qualified variable name of the variable itself is the last dot-separated segment and the section name is everything before the last - dot. The variable names are case-insensitive and only alphanumeric - characters are allowed. Some variables may appear multiple times. + dot. The variable names are case-insensitive, allow only alphanumeric + characters and `-`, and must start with an alphabetic character. Some + variables may appear multiple times. Syntax ~~~~~~ @@@ -54,9 -55,10 +55,10 @@@ All the other lines (and the remainder header) are recognized as setting variables, in the form 'name = value'. If there is no equal sign on the line, the entire line is taken as 'name' and the variable is recognized as boolean "true". - The variable names are case-insensitive and only alphanumeric - characters and `-` are allowed. There can be more than one value - for a given variable; we say then that variable is multivalued. + The variable names are case-insensitive, allow only alphanumeric characters + and `-`, and must start with an alphabetic character. There can be more + than one value for a given variable; we say then that the variable is + multivalued. Leading and trailing whitespace in a variable value is discarded. Internal whitespace within a variable value is retained verbatim. @@@ -84,17 -86,6 +86,17 @@@ customary UNIX fashion Some variables may require a special value format. +Includes +~~~~~~~~ + +You can include one config file from another by setting the special +`include.path` variable to the name of the file to be included. The +included file is expanded immediately, as if its contents had been +found at the location of the include directive. If the value of the +`include.path` variable is a relative path, the path is considered to be +relative to the configuration file in which the include directive was +found. See below for examples. + Example ~~~~~~~ @@@ -117,10 -108,6 +119,10 @@@ gitProxy="ssh" for "kernel.org" gitProxy=default-proxy ; for the rest + [include] + path = /path/to/foo.inc ; include by absolute path + path = foo ; expand "foo" relative to the current file + Variables ~~~~~~~~~ diff --combined Documentation/git-config.txt index aa8303b1ad,7617d9eb24..81b03982e3 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@@ -85,8 -85,11 +85,11 @@@ OPTION is not exactly one. --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. --global:: For writing options: write to global ~/.gitconfig file rather than @@@ -178,11 -181,6 +181,11 @@@ See also <> Opens an editor to modify the specified config file; either '--system', '--global', or repository (default). +--includes:: +--no-includes:: + Respect `include.*` directives in config files when looking up + values. Defaults to on. + [[FILES]] FILES -----