• Duy Nguyen's avatar
    pack-objects: clarify the use of object_entry::size · 27a7d067
    Duy Nguyen authored
    While this field most of the time contains the canonical object size,
    there is one case it does not: when we have found that the base object
    of the delta in question is also to be packed, we will very happily
    reuse the delta by copying it over instead of regenerating the new
    "size" in this case will record the delta size, not canonical object
    size. Later on in write_reuse_object(), we reconstruct the delta
    header and "size" is used for this purpose. When this happens, the
    "type" field contains a delta type instead of a canonical type.
    Highlight this in the code since it could be tricky to see.
    Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
pack-objects.c 86.1 KB