diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-04-14 17:35:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-16 12:38:59 +0900 |
commit | 27a7d0679f17bd536f566e76e51058de0e1fa17a (patch) | |
tree | bddb22342ff1e11888fad86db46a4d981041b6d5 /t/t9902-completion.sh | |
parent | pack-objects: don't check size when the object is bad (diff) | |
download | tgif-27a7d0679f17bd536f566e76e51058de0e1fa17a.tar.xz |
pack-objects: clarify the use of object_entry::size
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
delta.
"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: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9902-completion.sh')
0 files changed, 0 insertions, 0 deletions