]> git.ipfire.org Git - thirdparty/git.git/commit
commit-graph: stop using signed integers to count Bloom filters
authorPatrick Steinhardt <ps@pks.im>
Thu, 7 Aug 2025 08:04:44 +0000 (10:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Aug 2025 21:32:27 +0000 (14:32 -0700)
commitc448978cfc685752502a50c50b47e914b6e97958
treefe151b2f256efb3cd247010c41c6763d2c288f78
parent10159fe7dd77a0545860c9043dedce86f900f90a
commit-graph: stop using signed integers to count Bloom filters

When writing a new commit graph we have a couple of counters that
provide statistics around what kind of Bloom filters we have or have not
written. These counters naturally count from zero and are only ever
incremented, but they use a signed integer as type regardless.

Refactor those fields to be unsigned instead. Using an unsigned type
makes it explicit to the reader that they never have to worry about
negative values and thus makes the code easier to understand.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c