Skip to content

Commit

Permalink
Merge branch 'jk/config-warn-on-inaccessible-paths'
Browse files Browse the repository at this point in the history
The attribute system may be asked for a path that itself or its
leading directories no longer exists in the working tree.  Failure
to open per-directory .gitattributes with error status other than
ENOENT and ENOTDIR are diagnosed.

* jk/config-warn-on-inaccessible-paths:
  attr: failure to open a .gitattributes file is OK with ENOTDIR
  • Loading branch information
gitster committed Sep 17, 2012
2 parents d6e32f6 + 8e950da commit d6fb624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d6fb624

Please sign in to comment.