summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Matthieu Moy <Matthieu.Moy@imag.fr>2012-07-24 14:26:51 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-24 08:59:07 -0700
commit6283a376c47e7ca3327e563143c1ceda39ae25ac (patch)
tree85ed93767ccc872c1e1fbc45d258478d77ea78ec /dir.c
parentattr: make sure we have an xdg path before using it (diff)
downloadtgif-6283a376c47e7ca3327e563143c1ceda39ae25ac.tar.xz
ignore: make sure we have an xdg path before using it
Commit e3ebc35 (config: fix several access(NULL) calls, 2012-07-12) was fixing access(NULL) calls when trying to access $HOME/.config/git/config, but missed the ones when trying to access $HOME/.config/git/ignore. Fix and test this. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 390367fa67..059ec28dbb 100644
--- a/dir.c
+++ b/dir.c
@@ -1302,7 +1302,7 @@ void setup_standard_excludes(struct dir_struct *dir)
}
if (!access(path, R_OK))
add_excludes_from_file(dir, path);
- if (!access(excludes_file, R_OK))
+ if (excludes_file && !access(excludes_file, R_OK))
add_excludes_from_file(dir, excludes_file);
}