diff options
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 da79ac4bc7..c2ebea4ed3 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 bfd3016e83..a58f99c2d7 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) /* |