diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-11 14:24:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-11 14:24:01 -0700 |
commit | 558e5a8c40944a6a952c7e15dab648b922e0bd02 (patch) | |
tree | 0416da7b9ef7b43c3d5e5bf766507b43735db5d3 /builtin | |
parent | Merge branch 'ep/do-not-feed-a-pointer-to-array-size' (diff) | |
parent | path.c: remove home_config_paths() (diff) | |
download | tgif-558e5a8c40944a6a952c7e15dab648b922e0bd02.tar.xz |
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 'builtin')
-rw-r--r-- | builtin/commit.c | 8 | ||||
-rw-r--r-- | builtin/config.c | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 310674cfd0..d6515a2a50 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1398,12 +1398,10 @@ int cmd_status(int argc, const char **argv, const char *prefix) static const char *implicit_ident_advice(void) { - char *user_config = NULL; - char *xdg_config = NULL; - int config_exists; + char *user_config = expand_user_path("~/.gitconfig"); + char *xdg_config = xdg_config_home("config"); + int config_exists = file_exists(user_config) || file_exists(xdg_config); - home_config_paths(&user_config, &xdg_config, "config"); - config_exists = file_exists(user_config) || file_exists(xdg_config); free(user_config); free(xdg_config); diff --git a/builtin/config.c b/builtin/config.c index 28f57c8fb9..7188405f7e 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) /* |