提交 e682c9db 编写于 作者: P Paul Tan 提交者: Junio C Hamano

git-commit: replace use of home_config_paths()

Since home_config_paths() combines two 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: NPaul Tan <pyokagan@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 64ab71db
......@@ -1402,12 +1402,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册