downgrade "packfile cannot be accessed" errors to warnings
[gitweb.git] / sha1_file.c
index e002056b85ce89c089dd09c1300461d60d81dffa..cad1f22002d87c3bb015917c3f8d3292c1451639 100644 (file)
@@ -1984,7 +1984,7 @@ off_t find_pack_entry_one(const unsigned char *sha1,
        return 0;
 }
 
-static int is_pack_valid(struct packed_git *p)
+int is_pack_valid(struct packed_git *p)
 {
        /* An already open pack is known to be valid. */
        if (p->pack_fd != -1)
@@ -2035,7 +2035,7 @@ static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
                         * was loaded!
                         */
                        if (!is_pack_valid(p)) {
-                               error("packfile %s cannot be accessed", p->pack_name);
+                               warning("packfile %s cannot be accessed", p->pack_name);
                                goto next;
                        }
                        e->offset = offset;