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: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Paul Tan committed
May 6, 2015 at 16:00 UTC
2527bbce25dcfd952064cf02057ad8729134ed44
1 file changed
+2
-5
attr.c
+2
-5
@@ -478,7 +478,6 @@ static int git_attr_system(void)
478
static void bootstrap_attr_stack(void)
479
{
480
struct attr_stack *elem;
481
- char *xdg_attributes_file;
481
482
if (attr_stack)
483
return;
@@ -497,10 +496,8 @@ static void bootstrap_attr_stack(void)
496
}
497
}
498
500
- if (!git_attributes_file) {
501
- home_config_paths(NULL, &xdg_attributes_file, "attributes");
502
- git_attributes_file = xdg_attributes_file;
503
- }
499
+ if (!git_attributes_file)
500
+ git_attributes_file = xdg_config_home("attributes");
501
if (git_attributes_file) {
502
elem = read_attr_from_file(git_attributes_file, 1);
503
if (elem) {