summaryrefslogtreecommitdiffstats
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-07 07:11:16 +0100
committerJunio C Hamano <gitster@pobox.com>2013-01-07 07:11:16 +0100
commit4f43e9726af5d036af96de9e5208a6122d378f9b (patch)
treef50d3e8b91afe0ee2f45430639c2d6947d5ce651 /git-compat-util.h
parentMerge branch 'jc/apply-trailing-blank-removal' (diff)
parentconfig: exit on error accessing any config file (diff)
downloadgit-4f43e9726af5d036af96de9e5208a6122d378f9b.tar.xz
git-4f43e9726af5d036af96de9e5208a6122d378f9b.zip
Merge branch 'jn/warn-on-inaccessible-loosen'
Deal with a situation where .config/git is a file and we notice .config/git/config is not readable due to ENOTDIR, not ENOENT. * jn/warn-on-inaccessible-loosen: config: exit on error accessing any config file doc: advertise GIT_CONFIG_NOSYSTEM config: treat user and xdg config permission problems as errors config, gitignore: failure to access with ENOTDIR is ok
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 9661bc9f73..2cecf56eb3 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -654,8 +654,12 @@ int rmdir_or_warn(const char *path);
*/
int remove_or_warn(unsigned int mode, const char *path);
-/* Call access(2), but warn for any error besides ENOENT. */
+/*
+ * Call access(2), but warn for any error except "missing file"
+ * (ENOENT or ENOTDIR).
+ */
int access_or_warn(const char *path, int mode);
+int access_or_die(const char *path, int mode);
/* Warn on an inaccessible file that ought to be accessible */
void warn_on_inaccessible(const char *path);