read_packed_refs(): ensure that references are ordered when read
[gitweb.git] / refs / ref-cache.c
index 76bb723c8674c3022b271c93b587d941c8e6d397..54dfb5218cab33271cbf5451deaef9379ce50f27 100644 (file)
@@ -574,7 +574,7 @@ struct ref_iterator *cache_ref_iterator_begin(struct ref_cache *cache,
 
        iter = xcalloc(1, sizeof(*iter));
        ref_iterator = &iter->base;
-       base_ref_iterator_init(ref_iterator, &cache_ref_iterator_vtable);
+       base_ref_iterator_init(ref_iterator, &cache_ref_iterator_vtable, 1);
        ALLOC_GROW(iter->levels, 10, iter->levels_alloc);
 
        iter->levels_nr = 1;