summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-07 18:08:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-07 18:08:56 (GMT)
commit7fe136d78f5db3317ebf60115c1d7faa87412d6a (patch)
treed9f4d19d5bd01254450e6d4b169f9e30952de79e /git-compat-util.h
parent09827f2a55299cc8c09d30754c016378a15c4775 (diff)
parent55b38a48e2a7ccfaaa7897a5fccb98327fa0e3c0 (diff)
downloadgit-7fe136d78f5db3317ebf60115c1d7faa87412d6a.zip
git-7fe136d78f5db3317ebf60115c1d7faa87412d6a.tar.gz
git-7fe136d78f5db3317ebf60115c1d7faa87412d6a.tar.bz2
Merge branch 'jk/config-warn-on-inaccessible-paths'
When looking for $HOME/.gitconfig etc., it is OK if we cannot read them because they do not exist, but we did not diagnose existing files that we cannot read. * jk/config-warn-on-inaccessible-paths: warn_on_inaccessible(): a helper to warn on inaccessible paths attr: warn on inaccessible attribute files gitignore: report access errors of exclude files config: warn on inaccessible files
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 34f040f..fd732d7 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -609,6 +609,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. */
+int access_or_warn(const char *path, int mode);
+
+/* Warn on an inaccessible file that ought to be accessible */
+void warn_on_inaccessible(const char *path);
+
/* Get the passwd entry for the UID of the current process. */
struct passwd *xgetpwuid_self(void);