summaryrefslogtreecommitdiff
path: root/versioncmp.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-04-14 15:35:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-16 03:38:59 (GMT)
commit0aca34e8269514ebb67676e0470a314615494ae8 (patch)
tree18835e8a3322ddb23f021b413aed31f907772949 /versioncmp.c
parentac77d0c370dc5b23ac1ec4a13c754fe7ffa48564 (diff)
downloadgit-0aca34e8269514ebb67676e0470a314615494ae8.zip
git-0aca34e8269514ebb67676e0470a314615494ae8.tar.gz
git-0aca34e8269514ebb67676e0470a314615494ae8.tar.bz2
pack-objects: shrink delta_size field in struct object_entry
Allowing a delta size of 64 bits is crazy. Shrink this field down to 20 bits with one overflow bit. If we find an existing delta larger than 1MB, we do not cache delta_size at all and will get the value from oe_size(), potentially from disk if it's larger than 4GB. Note, since DELTA_SIZE() is used in try_delta() code, it must be thread-safe. Luckily oe_size() does guarantee this so we it is thread-safe. 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 'versioncmp.c')
0 files changed, 0 insertions, 0 deletions