gitignore: report access errors of exclude files
commit6966073102170171da4c25a4038bbd143fa6a75b
authorJeff King <peff@peff.net>
Tue, 21 Aug 2012 06:26:07 +0000 (21 02:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Aug 2012 21:46:47 +0000 (21 14:46 -0700)
treef68b9b41c6d15cbccf8da69bd703e4272e607aae
parentba8bd8300a544959159f6bd3a7e03ac54f85ea3a
gitignore: report access errors of exclude files

When we try to access gitignore files, we check for their
existence with a call to "access". We silently ignore
missing files. However, if a file is not readable, this may
be a configuration error; let's warn the user.

For $GIT_DIR/info/excludes or core.excludesfile, we can just
use access_or_warn. However, for per-directory files we
actually try to open them, so we must add a custom warning.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c