aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2012-07-24 14:26:51 +0200
committerJunio C Hamano <gitster@pobox.com>2012-07-24 08:59:07 -0700
commit6283a376c47e7ca3327e563143c1ceda39ae25ac (patch)
tree85ed93767ccc872c1e1fbc45d258478d77ea78ec /t
parentf0c1c15c41bdcdaf71c69355ac83789466820879 (diff)
downloadgit-6283a376c47e7ca3327e563143c1ceda39ae25ac.tar.gz
git-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 't')
-rwxr-xr-xt/t1306-xdg-files.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t1306-xdg-files.sh b/t/t1306-xdg-files.sh
index 1569596ab..94bb696ff 100755
--- a/t/t1306-xdg-files.sh
+++ b/t/t1306-xdg-files.sh
@@ -95,6 +95,13 @@ test_expect_success 'Exclusion in a non-XDG global ignore file' '
test_must_fail git add to_be_excluded
'
+test_expect_success 'Checking XDG ignore file when HOME is unset' '
+ >expected &&
+ (sane_unset HOME &&
+ git config --unset core.excludesfile &&
+ git ls-files --exclude-standard --ignored >actual) &&
+ test_cmp expected actual
+'
test_expect_success 'Checking attributes in the XDG attributes file' '
echo foo >f &&