summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-08-13 14:55:41 +0000
committerJunio C Hamano <gitster@pobox.com>2026-08-13 09:42:02 -0700
commitcfd8970fa78f40e9e3d470e8a1112e21c7c778b0 (patch)
treec117305d3fb4042382dffc5db42498eabb09519a /contrib/persistent-https
parent92b77c4a331cde83cb0d4bc59f7cba8820f55155 (diff)
pack-objects: widen delta-cache accounting to `size_t`
These three are a single accounting tuple (the globals tracking cumulative cached-delta bytes, plus the helper that compares them against an incoming delta size) and are latently 32-bit on Windows where `unsigned long` != `size_t`: a pack with many large cached deltas could wrap silently. The widening is internally consistent on its own: the additions and subtractions against delta_cache_size already come from `size_t` sources (`DELTA_SIZE()` returns `size_t`), and `delta_cacheable()`'s sole caller in `try_delta()` still passes `unsigned long`, which promotes. Prerequisite for dropping `try_delta()`'s `cast_size_t_to_ulong()` shims, which becomes possible once 1create_delta()` and `diff_delta()` are widened in a later commit. Note: since `max_delta_cache_size` changes data type to `size_t`, a pair of new helpers is introduced to parse config values of that type, too. Assisted-by: Opus 4.7 Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions