Skip to content

Commit 2527bbc

Browse files
pyokagangitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ea19289 commit 2527bbc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

attr.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ static int git_attr_system(void)
478478
static void bootstrap_attr_stack(void)
479479
{
480480
struct attr_stack *elem;
481-
char *xdg_attributes_file;
482481

483482
if (attr_stack)
484483
return;
@@ -497,10 +496,8 @@ static void bootstrap_attr_stack(void)
497496
}
498497
}
499498

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");
504501
if (git_attributes_file) {
505502
elem = read_attr_from_file(git_attributes_file, 1);
506503
if (elem) {

0 commit comments

Comments
 (0)