Merge branch 'maint' of git://github.com/git-l10n/git-po into maint
[git.git] / wrapper.c
index b40c7e73daa239ee3b78b35875b46e57c40e8ede..68739aaa3b9e9e1a1bbbd43c75c9b5c244fb6c3e 100644 (file)
--- a/wrapper.c
+++ b/wrapper.c
@@ -403,11 +403,16 @@ int remove_or_warn(unsigned int mode, const char *file)
        return S_ISGITLINK(mode) ? rmdir_or_warn(file) : unlink_or_warn(file);
 }
 
+void warn_on_inaccessible(const char *path)
+{
+       warning(_("unable to access '%s': %s"), path, strerror(errno));
+}
+
 int access_or_warn(const char *path, int mode)
 {
        int ret = access(path, mode);
        if (ret && errno != ENOENT)
-               warning(_("unable to access '%s': %s"), path, strerror(errno));
+               warn_on_inaccessible(path);
        return ret;
 }