summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index faea58d..90d8bfa 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -1173,7 +1173,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1,
}
pos++;
}
- if (!gently)
+ if (!gently && name[1] && name[1] != '/')
diagnose_invalid_index_path(stage, prefix, cp);
free(new_path);
return -1;