summaryrefslogtreecommitdiff
path: root/pack-check.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-06-24 23:17:12 -0400
committerJunio C Hamano <gitster@pobox.com>2008-06-24 23:58:57 -0700
commit99093238bbf2cd886debf7bdb91478cb405ef66d (patch)
tree799a8766f4dc7d3414ac31200149ba9945b1c6c2 /pack-check.c
parent8e21d63b02f1b26f7695ca515e51e4622a995af2 (diff)
downloadgit-99093238bbf2cd886debf7bdb91478cb405ef66d.tar.gz
optimize verify-pack a bit
Using find_pack_entry_one() to get object offsets is rather suboptimal when nth_packed_object_offset() can be used directly. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-check.c')
-rw-r--r--pack-check.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pack-check.c b/pack-check.c
index b99a9171c0..d6dbd4b9d8 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -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);