mingw: Suppress warning that <commit>:.gitattributes does not exist

On Windows, a file name containing a colon is illegal. We should
therefore expect the corresponding errno when `fopen()` is called for a
path of the form <commit>:.gitattributes.

This fixes https://github.com/git-for-windows/git/issues/255.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2015-08-13 15:25:59 +00:00
parent e8a8fdba9d
commit 6008c2da26

2
attr.c
View File

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