summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index bd5f82e..fbb73f5 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2971,6 +2971,9 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi,
lookup_replace_object(sha1) :
sha1;
+ if (is_null_sha1(real))
+ return -1;
+
if (!oi)
oi = &blank_oi;