config: read (but not write) from $XDG_CONFIG_HOME/git/config file
authorHuynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Fri, 22 Jun 2012 09:03:23 +0000 (11:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jun 2012 16:05:55 +0000 (09:05 -0700)
commit21cf32279120799a766d22416be7d82d9ecfbd04
tree1d0d3324292a54bb70a7a3abd84fdca129313b2a
parent0e18bef7e62d6fffd09c394381056ec7a4a79840
config: read (but not write) from $XDG_CONFIG_HOME/git/config file

Teach git to read the "gitconfig" information from a new location,
$XDG_CONFIG_HOME/git/config; this allows the user to avoid
cluttering $HOME with many per-application configuration files.

In the order of reading, this file comes between the global
configuration file (typically $HOME/.gitconfig) and the system wide
configuration file (typically /etc/gitconfig).

We do not write to this new location (yet).

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used. This is in line with XDG specification.

If the new file does not exist, the behavior is unchanged.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-config.txt
builtin/config.c
cache.h
config.c
path.c
t/t1306-xdg-files.sh [new file with mode: 0755]