clone: add a --no-tags option to clone without tags
[gitweb.git] / sha1_file.c
index 43990dec735099fd2e94cf73e41f318fbaf5dd38..7369f7495a06e40eb885deb2101736c9105d950e 100644 (file)
@@ -2952,7 +2952,7 @@ static int sha1_loose_object_info(const unsigned char *sha1,
        if (status && oi->typep)
                *oi->typep = status;
        strbuf_release(&hdrbuf);
-       return 0;
+       return (status < 0) ? status : 0;
 }
 
 int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi, unsigned flags)