optimize verify-pack a bit
[git/git.git] / pack-check.c
index b99a917..d6dbd4b 100644 (file)
@@ -67,9 +67,7 @@ static int verify_packfile(struct packed_git *p,
                entries[i].sha1 = nth_packed_object_sha1(p, i);
                if (!entries[i].sha1)
                        die("internal error pack-check nth-packed-object");
-               entries[i].offset = find_pack_entry_one(entries[i].sha1, p);
-               if (!entries[i].offset)
-                       die("internal error pack-check find-pack-entry-one");
+               entries[i].offset = nth_packed_object_offset(p, i);
        }
        qsort(entries, nr_objects, sizeof(*entries), compare_entries);