Noticed-by: Ole Tange <o...@tange.dk>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 On Sun, Feb 7, 2016 at 4:56 AM, Ole Tange <o...@tange.dk> wrote:
 > If file name too long it should just try to see if it is a reference
 > to a revision.

 Looks easy enough to fix.

 setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.c b/setup.c
index 2c4b22c..ab8f85d 100644
--- a/setup.c
+++ b/setup.c
@@ -147,7 +147,7 @@ int check_filename(const char *prefix, const char *arg)
                name = arg;
        if (!lstat(name, &st))
                return 1; /* file exists */
-       if (errno == ENOENT || errno == ENOTDIR)
+       if (errno == ENOENT || errno == ENOTDIR || errno == ENAMETOOLONG)
                return 0; /* file does not exist */
        die_errno("failed to stat '%s'", arg);
 }
-- 
2.7.0.377.g4cd97dd

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to