diff options
author | Paul Tan <pyokagan@gmail.com> | 2015-05-06 16:01:03 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-06 11:33:48 -0700 |
commit | 509adc335274d2656829b18e1e83ccabda059ae3 (patch) | |
tree | f47097944c6c14024afc8408a9e5e088be0296c2 /builtin | |
parent | git-commit: replace use of home_config_paths() (diff) | |
download | tgif-509adc335274d2656829b18e1e83ccabda059ae3.tar.xz |
git-config: replace use of home_config_paths()
Since home_config_paths() combines distinct functionality already
implemented by expand_user_path() and xdg_config_home(), and hides the
home config file path ~/.gitconfig. Make the code more explicit by
replacing the use of home_config_paths() with expand_user_path() and
xdg_config_home().
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/config.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin/config.c b/builtin/config.c index 15a7bea936..2f8bf7d7cf 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) /* |