summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-11 14:24:01 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-11 14:24:01 -0700
commit558e5a8c40944a6a952c7e15dab648b922e0bd02 (patch)
tree0416da7b9ef7b43c3d5e5bf766507b43735db5d3 /config.c
parent7cb5073fcaffe8a8c0572fdffb332110b0eaae69 (diff)
parent846e5dfbab5d5a0a85252c1400dc0371e02e75a8 (diff)
downloadgit-558e5a8c40944a6a952c7e15dab648b922e0bd02.tar.gz
Merge branch 'pt/xdg-config-path'
Code clean-up for xdg configuration path support. * pt/xdg-config-path: path.c: remove home_config_paths() git-config: replace use of home_config_paths() git-commit: replace use of home_config_paths() credential-store.c: replace home_config_paths() with xdg_config_home() dir.c: replace home_config_paths() with xdg_config_home() attr.c: replace home_config_paths() with xdg_config_home() path.c: implement xdg_config_home()
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/config.c b/config.c
index 6d0098fc80..ab46462e15 100644
--- a/config.c
+++ b/config.c
@@ -1187,10 +1187,8 @@ int git_config_system(void)
int git_config_early(config_fn_t fn, void *data, const char *repo_config)
{
int ret = 0, found = 0;
- char *xdg_config = NULL;
- char *user_config = NULL;
-
- home_config_paths(&user_config, &xdg_config, "config");
+ char *xdg_config = xdg_config_home("config");
+ char *user_config = expand_user_path("~/.gitconfig");
if (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0)) {
ret += git_config_from_file(fn, git_etc_gitconfig(),