credential doc: make multiple-helper behavior more prominent

Git's configuration system works by reading multiple configuration files in order, from general to specific: - first, the system configuration /etc/gitconfig - then the user's configuration (~/.gitconfig or ~/.config/git/config) - then the repository configuration (.git/config) For single-valued configuration items, the latest value wins. For multi-valued configuration items, values accumulate in that order. For example, this allows setting a credential helper globally in ~/.gitconfig that git will try to use in all repositories, regardless of whether they additionally provide another helper. This is usually a nice thing --- e.g. I can install helpers to use my OS keychain and to cache credentials for a short period of time globally. Sometimes people want to be able to override an inherited setting. For the credential.helper setting, this is done by setting the configuration item to empty before giving it a new value. This is already documented but the documentation is hard to find --- git-config(1) says to look at gitcredentials(7) and the config reference in gitcredentials(7) doesn't mention this issue. Move the documentation to the config reference to make it easier to find. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed May 1, 2017 at 17:21 UTC 515360f9e9be976344e3d21cf6f28dcd2ff3c4f9
1 file changed +10 -10
Documentation/gitcredentials.txt
+10 -10
@@ -101,16 +101,6 @@ $ git help credential-foo
101 $ git config --global credential.helper foo
102 -------------------------------------------
103
104 -If there are multiple instances of the `credential.helper` configuration
105 -variable, each helper will be tried in turn, and may provide a username,
106 -password, or nothing. Once Git has acquired both a username and a
107 -password, no more helpers will be tried.
108 -
109 -If `credential.helper` is configured to the empty string, this resets
110 -the helper list to empty (so you may override a helper set by a
111 -lower-priority config file by configuring the empty-string helper,
112 -followed by whatever set of helpers you would like).
113 -
104
105 CREDENTIAL CONTEXTS
106 -------------------
@@ -162,6 +152,16 @@ helper::
152 shell (so, for example, setting this to `foo --option=bar` will execute
153 `git credential-foo --option=bar` via the shell. See the manual of
154 specific helpers for examples of their use.
155 ++
156 +If there are multiple instances of the `credential.helper` configuration
157 +variable, each helper will be tried in turn, and may provide a username,
158 +password, or nothing. Once Git has acquired both a username and a
159 +password, no more helpers will be tried.
160 ++
161 +If `credential.helper` is configured to the empty string, this resets
162 +the helper list to empty (so you may override a helper set by a
163 +lower-priority config file by configuring the empty-string helper,
164 +followed by whatever set of helpers you would like).
165
166 username::
167