From: Junio C Hamano Date: Mon, 5 Jun 2017 00:03:15 +0000 (+0900) Subject: Merge branch 'jk/url-insteadof-config' into maint X-Git-Tag: v2.13.1~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7dab7c5b59d2b3e45ecda8cd47931db9dfc96ae2?ds=inline;hp=-c Merge branch 'jk/url-insteadof-config' into maint The interaction of "url.*.insteadOf" and custom URL scheme's whitelisting is now documented better. * jk/url-insteadof-config: docs/config: mention protocol implications of url.insteadOf --- 7dab7c5b59d2b3e45ecda8cd47931db9dfc96ae2 diff --combined Documentation/config.txt index 65093ac22c,2c1d7494b9..67f8c8fe51 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -79,20 -79,14 +79,20 @@@ escape sequences) are invalid Includes ~~~~~~~~ +The `include` and `includeIf` sections allow you to include config +directives from another source. These sections behave identically to +each other with the exception that `includeIf` sections may be ignored +if their condition does not evaluate to true; see "Conditional includes" +below. + You can include a config file from another by setting the special -`include.path` variable to the name of the file to be included. The -variable takes a pathname as its value, and is subject to tilde -expansion. `include.path` can be given multiple times. +`include.path` (or `includeIf.*.path`) variable to the name of the file +to be included. The variable takes a pathname as its value, and is +subject to tilde expansion. These variables can be given multiple times. -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 +The contents of the included file are inserted immediately, as if they +had been found at the location of the include directive. If the value of the +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. @@@ -101,7 -95,8 +101,7 @@@ Conditional include You can include a config file from another conditionally by setting a `includeIf..path` variable to the name of the file to be -included. The variable's value is treated the same way as -`include.path`. `includeIf..path` can be given multiple times. +included. The condition starts with a keyword followed by a colon and some data whose format and meaning depends on the keyword. Supported keywords @@@ -172,8 -167,8 +172,8 @@@ Exampl [include] path = /path/to/foo.inc ; include by absolute path - path = foo ; expand "foo" relative to the current file - path = ~/foo ; expand "foo" in your `$HOME` directory + path = foo.inc ; find "foo.inc" relative to the current file + path = ~/foo.inc ; find "foo.inc" in your `$HOME` directory ; include if $GIT_DIR is /path/to/foo/.git [includeIf "gitdir:/path/to/foo/.git"] @@@ -187,12 -182,6 +187,12 @@@ [includeIf "gitdir:~/to/group/"] path = /path/to/foo.inc + ; relative paths are always relative to the including + ; file (if the condition is true); their location is not + ; affected by the condition + [includeIf "gitdir:/path/to/group/"] + path = foo.inc + Values ~~~~~~ @@@ -2151,10 -2140,6 +2151,10 @@@ log.showRoot: Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which normally hide the root commit will now show it. True by default. +log.showSignature:: + If true, makes linkgit:git-log[1], linkgit:git-show[1], and + linkgit:git-whatchanged[1] assume `--show-signature`. + log.mailmap:: If true, makes linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1] assume `--use-mailmap`. @@@ -2635,8 -2620,9 +2635,8 @@@ receive.advertiseAtomic: capability, set this variable to false. receive.advertisePushOptions:: - By default, git-receive-pack will advertise the push options - capability to its clients. If you don't want to advertise this - capability, set this variable to false. + When set to true, git-receive-pack will advertise the push options + capability to its clients. False by default. receive.autogc:: By default, git-receive-pack will run "git-gc --auto" after @@@ -3222,6 -3208,13 +3222,13 @@@ url..insteadOf: the best alternative for the particular user, even for a never-before-seen repository on the site. When more than one insteadOf strings match a given URL, the longest match is used. + + + Note that any protocol restrictions will be applied to the rewritten + URL. If the rewrite changes the URL to use a custom protocol or remote + helper, you may need to adjust the `protocol.*.allow` config to permit + the request. In particular, protocols you expect to use for submodules + must be set to `always` rather than the default of `user`. See the + description of `protocol.allow` above. url..pushInsteadOf:: Any URL that starts with this value will not be pushed to;