summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abspath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/abspath.c b/abspath.c
index 0393213e5a..fce40fddcc 100644
--- a/abspath.c
+++ b/abspath.c
@@ -141,6 +141,8 @@ char *strbuf_realpath(struct strbuf *resolved, const char *path,
strbuf_reset(&symlink);
if (num_symlinks++ > MAXSYMLINKS) {
+ errno = ELOOP;
+
if (die_on_error)
die("More than %d nested symlinks "
"on path '%s'", MAXSYMLINKS, path);