summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-06-05 12:00:03 -0700
committerJunio C Hamano <gitster@pobox.com>2015-06-05 12:00:04 -0700
commitd9c82fa7a75ae617718f195bb5f5ff5c904f2687 (patch)
tree202fad68c8cd4f1dc82f7e51bbd3b53eb391c077 /dir.c
parent9eabf5b536662000f79978c4d1b6e4eff5c8d785 (diff)
parent846e5dfbab5d5a0a85252c1400dc0371e02e75a8 (diff)
downloadgit-d9c82fa7a75ae617718f195bb5f5ff5c904f2687.tar.gz
Merge branch 'pt/xdg-config-path' into maint
Code clean-up for xdg configuration path support. * pt/xdg-config-path: path.c: remove home_config_paths() git-config: replace use of home_config_paths() git-commit: replace use of home_config_paths() credential-store.c: replace home_config_paths() with xdg_config_home() dir.c: replace home_config_paths() with xdg_config_home() attr.c: replace home_config_paths() with xdg_config_home() path.c: implement xdg_config_home() t0302: "unreadable" test needs POSIXPERM t0302: test credential-store support for XDG_CONFIG_HOME git-credential-store: support XDG_CONFIG_HOME git-credential-store: support multiple credential files
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/dir.c b/dir.c
index a3e7073400..0c38d86014 100644
--- a/dir.c
+++ b/dir.c
@@ -1671,14 +1671,11 @@ int remove_dir_recursively(struct strbuf *path, int flag)
void setup_standard_excludes(struct dir_struct *dir)
{
const char *path;
- char *xdg_path;
dir->exclude_per_dir = ".gitignore";
path = git_path("info/exclude");
- if (!excludes_file) {
- home_config_paths(NULL, &xdg_path, "ignore");
- excludes_file = xdg_path;
- }
+ if (!excludes_file)
+ excludes_file = xdg_config_home("ignore");
if (!access_or_warn(path, R_OK, 0))
add_excludes_from_file(dir, path);
if (excludes_file && !access_or_warn(excludes_file, R_OK, 0))