• M
    mmapped_ref_iterator: add iterator over a packed-refs file · 9cfb3dc0
    Michael Haggerty 提交于
    Add a new `mmapped_ref_iterator`, which can iterate over the
    references in an mmapped `packed-refs` file directly. Use this
    iterator from `read_packed_refs()` to fill the packed refs cache.
    
    Note that we are not yet willing to promise that the new iterator
    generates its output in order. That doesn't matter for now, because
    the packed refs cache doesn't care what order it is filled.
    
    This change adds a lot of boilerplate without providing any obvious
    benefits. The benefits will come soon, when we get rid of the
    `ref_cache` for packed references altogether.
    Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    9cfb3dc0
packed-backend.c 31.2 KB