Subject: Re: [PATCH 2/9] commit-graph: stop using signed integers to count bloom filters

From: Patrick Steinhardt <[email-masked]>
Date: Mon, 4 Aug 2025 13:18:05 +0200

On Mon, Aug 04, 2025 at 11:13:28AM +0200, Oswald Buddenhagen wrote:
> On Mon, Aug 04, 2025 at 10:17:18AM +0200, Patrick Steinhardt wrote:
> > 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 of type `size_t` instead.
> > 
> mind elaborating on that choice?

We tend to use `size_t` when counting stuff.

> it feels like abuse at the semantic level, and it increases the data size on
> lp64 platforms. is it even compatible with OPT_UNSIGNED (in later commits)?
> that would be unexpected ...

Yes, it is, starting with my 2bc5414c41 (Merge branch
'ps/parse-options-integers', 2025-04-24). Regarding the data size I
don't really think that matters much. It's not like we have hundreds of
thousands of commit graphs in-memory at any point in time.

Patrick