diff options
author | Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr> | 2012-06-22 11:03:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-25 09:06:15 -0700 |
commit | 0e8593dc5b812df00400347e88f5707225fe831e (patch) | |
tree | 68be684a7a46815589337e28743371b3c862288c /Documentation/git-config.txt | |
parent | 684e40f657ae004d60dfa833567bec4a409d78f9 (diff) | |
download | git-0e8593dc5b812df00400347e88f5707225fe831e.tar.gz |
config: write to $XDG_CONFIG_HOME/git/config file when appropriate
Teach git to write to $XDG_CONFIG_HOME/git/config if
- it already exists,
- $HOME/.gitconfig file doesn't, and
- The --global option is used.
Otherwise, write to $HOME/.gitconfig when the --global option is
given, as before.
If the user doesn't create $XDG_CONFIG_HOME/git/config, there is
absolutely no change. Users can use this new file only if they want.
If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used.
Advice for users who often come back to an old version of Git: you
shouldn't create this file.
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>
Diffstat (limited to 'Documentation/git-config.txt')
-rw-r--r-- | Documentation/git-config.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 09675cba4a..2d6ef32a08 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -97,7 +97,8 @@ OPTIONS --global:: For writing options: write to global ~/.gitconfig file rather than - the repository .git/config. + the repository .git/config, write to $XDG_CONFIG_HOME/git/config file + if this file exists and the ~/.gitconfig file doesn't. + For reading options: read only from global ~/.gitconfig and from $XDG_CONFIG_HOME/git/config rather than from all available files. |