aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/config.c6
-rw-r--r--config.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 15a7bea93..2f8bf7d7c 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -488,10 +488,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
}
if (use_global_config) {
- char *user_config = NULL;
- char *xdg_config = NULL;
-
- home_config_paths(&user_config, &xdg_config, "config");
+ char *user_config = expand_user_path("~/.gitconfig");
+ char *xdg_config = xdg_config_home("config");
if (!user_config)
/*
diff --git a/config.c b/config.c
index 752e2e227..0d7af9eef 100644
--- a/config.c
+++ b/config.c
@@ -1180,10 +1180,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(),