Merge branch 'jn/warn-on-inaccessible-loosen' into maint

When attempting to read the XDG-style $HOME/.config/git/config and
finding that $HOME/.config/git is a file, we gave a wrong error
message, instead of treating the case as "a custom config file does
not exist there" and moving on.

* 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
This commit is contained in:
Junio C Hamano
2013-01-11 16:47:07 -08:00
5 changed files with 31 additions and 7 deletions

View File

@ -637,8 +637,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);