diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2026-08-13 14:55:41 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-13 09:42:02 -0700 |
| commit | cfd8970fa78f40e9e3d470e8a1112e21c7c778b0 (patch) | |
| tree | c117305d3fb4042382dffc5db42498eabb09519a /gitweb/gitweb.css | |
| parent | 92b77c4a331cde83cb0d4bc59f7cba8820f55155 (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 'gitweb/gitweb.css')
0 files changed, 0 insertions, 0 deletions
