@@ -622,7 +622,7 @@ static void show_objects_for_type(
enum object_type object_type,
show_reachable_fn show_reach)
{
- size_t pos = 0, i = 0;
+ size_t i = 0;
uint32_t offset;
struct ewah_iterator it;
@@ -630,13 +630,15 @@ static void show_objects_for_type(
struct bitmap *objects = bitmap_git->result;
- if (bitmap_git->reuse_objects == bitmap_git->pack->num_objects)
- return;
-
ewah_iterator_init(&it, type_filter);
- while (i < objects->word_alloc && ewah_iterator_next(&filter, &it)) {
+ for (i = 0; i < objects->word_alloc &&
+ ewah_iterator_next(&filter, &it); i++) {
eword_t word = objects->words[i] & filter;
+ size_t pos = (i * BITS_IN_EWORD);
+
+ if (!word)
+ continue;
for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
struct object_id oid;
@@ -648,9 +650,6 @@ static void show_objects_for_type(
offset += ewah_bit_ctz64(word >> offset);
- if (pos + offset < bitmap_git->reuse_objects)
- continue;
-
entry = &bitmap_git->pack->revindex[pos + offset];
nth_packed_object_oid(&oid, bitmap_git->pack, entry->nr);
@@ -659,9 +658,6 @@ static void show_objects_for_type(
show_reach(&oid, object_type, 0, hash, bitmap_git->pack, entry->offset);
}
-
- pos += BITS_IN_EWORD;
- i++;
}
}