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 the symptom reported in

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

Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
---
 attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/attr.c b/attr.c
index 7e2134471cb..a0297088633 100644
--- a/attr.c
+++ b/attr.c
@@ -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;
        }
-- 
2.13.0.windows.1

Reply via email to