credential doc: make multiple-helper behavior more prominent
commit515360f9e9be976344e3d21cf6f28dcd2ff3c4f9
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 2 May 2017 00:21:14 +0000 (1 17:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 May 2017 01:58:06 +0000 (2 10:58 +0900)
tree2d580e9d9674c92e2efb1ba673199e343cba5a61
parent3b9e3c2cede15057af3ff8076c45ad5f33829436
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>
Documentation/gitcredentials.txt