Merge branch 'jk/config-warn-on-inaccessible-paths' into next

The attribute system may be asked for a path whose leading
directories do not exist in the current working tree.  In addition
to ENOENT, ENOTDIR must be ignored.

* jk/config-warn-on-inaccessible-paths:
  attr: failure to open a .gitattributes file is OK with ENOTDIR
This commit is contained in:
Junio C Hamano
2012-09-14 12:50:52 -07:00

2
attr.c
View File

@@ -353,7 +353,7 @@ static struct attr_stack *read_attr_from_file(const char *path, int macro_ok)
int lineno = 0;
if (!fp) {
if (errno != ENOENT)
if (errno != ENOENT && errno != ENOTDIR)
warn_on_inaccessible(path);
return NULL;
}