call init_pack_revindex() lazily

This makes life much easier for next patch, as well as being more efficient
when the revindex is actually not used.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nicolas Pitre
2008-06-23 21:22:14 -04:00
committed by Junio C Hamano
parent 6b516d984b
commit 1f5c74f6cf
4 changed files with 4 additions and 6 deletions

View File

@ -1148,8 +1148,6 @@ static void get_object_details(void)
sorted_by_offset[i] = objects + i;
qsort(sorted_by_offset, nr_objects, sizeof(*sorted_by_offset), pack_offset_sort);
init_pack_revindex();
for (i = 0; i < nr_objects; i++)
check_object(sorted_by_offset[i]);