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

attr.c: replace home_config_paths() with xdg_config_home()

Since only the xdg attributes file path is required, simplify the code
by using xdg_config_home() instead of home_config_paths().
Signed-off-by: NPaul Tan <pyokagan@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 ea19289b
......@@ -478,7 +478,6 @@ static int git_attr_system(void)
static void bootstrap_attr_stack(void)
{
struct attr_stack *elem;
char *xdg_attributes_file;
if (attr_stack)
return;
......@@ -497,10 +496,8 @@ static void bootstrap_attr_stack(void)
}
}
if (!git_attributes_file) {
home_config_paths(NULL, &xdg_attributes_file, "attributes");
git_attributes_file = xdg_attributes_file;
}
if (!git_attributes_file)
git_attributes_file = xdg_config_home("attributes");
if (git_attributes_file) {
elem = read_attr_from_file(git_attributes_file, 1);
if (elem) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册