]> git.ipfire.org Git - thirdparty/git.git/commit
delta, packfile: use size_t for delta header sizes
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 8 May 2026 08:16:42 +0000 (08:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 9 May 2026 02:25:32 +0000 (11:25 +0900)
commit17fa0775966dd9769864768c0fdc76d3cc2a01fb
tree7470626239167b55122d1ead6a7503630e8fa0cb
parent606c1923803c6d49df45178041c486431ff7cb4b
delta, packfile: use size_t for delta header sizes

The delta header decoding functions return unsigned long, which
truncates on Windows for objects larger than 4GB. Introduce size_t
variants get_delta_hdr_size_sz() and get_size_from_delta_sz() that
preserve the full 64-bit size, and use them in packed_object_info()
where the size is needed for streaming decisions.

This was originally authored by LordKiRon <https://github.com/LordKiRon>,
who preferred not to reveal their real name and therefore agreed that I
take over authorship.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
delta.h
packfile.c