summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
authorPaul Tan <pyokagan@gmail.com>2015-05-06 08:00:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-06 18:32:46 (GMT)
commit2527bbce25dcfd952064cf02057ad8729134ed44 (patch)
treeeca16d8301b4a4e400627ff6f374d820144583e9 /attr.c
parentea19289bc82351b7ac20ea2fd877e2bdde97ae34 (diff)
downloadgit-2527bbce25dcfd952064cf02057ad8729134ed44.zip
git-2527bbce25dcfd952064cf02057ad8729134ed44.tar.gz
git-2527bbce25dcfd952064cf02057ad8729134ed44.tar.bz2
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>
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/attr.c b/attr.c
index cd54697..c82904b 100644
--- a/attr.c
+++ b/attr.c
@@ -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) {