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

Since only the xdg excludes file path is required, simplify the code by replacing use of home_config_paths() with xdg_config_home(). 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:01 UTC 2845ce7ff1398e851d46b62154293378b74c466d
1 file changed +2 -5
dir.c
+2 -5
@@ -1622,14 +1622,11 @@ int remove_dir_recursively(struct strbuf *path, int flag)
1622 void setup_standard_excludes(struct dir_struct *dir)
1623 {
1624 const char *path;
1625 - char *xdg_path;
1625
1626 dir->exclude_per_dir = ".gitignore";
1627 path = git_path("info/exclude");
1629 - if (!excludes_file) {
1630 - home_config_paths(NULL, &xdg_path, "ignore");
1631 - excludes_file = xdg_path;
1632 - }
1628 + if (!excludes_file)
1629 + excludes_file = xdg_config_home("ignore");
1630 if (!access_or_warn(path, R_OK, 0))
1631 add_excludes_from_file(dir, path);
1632 if (excludes_file && !access_or_warn(excludes_file, R_OK, 0))