Noticed-by: Ole Tange [off-list ref]
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
On Sun, Feb 7, 2016 at 4:56 AM, Ole Tange [off-list ref] 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