From: Jeff King Date: Wed, 05 Aug 2026 20:32:55 GMT Subject: Re: [PATCH 1/4] revision: move bloom keyvec precondition into function Message-ID: <20260805203255.GA1010713@coredump.intra.peff.net> In-Reply-To: <87wlu44bv3.fsf@emacs.iotcl.com> On Wed, Aug 05, 2026 at 09:16:00PM +0200, Toon Claes wrote: > > But nobody ever cares about the difference between "1" and "-1", because > > the probabilistic data structure means "we could not check" must err on > > the side of "it might be in the filter". > > That's not entirely true. The `count_bloom_filter_false_positive` > depends on knowing whether the filter said "maybe" or if no filter was > used at all. Ah, yeah, you're right. I saw the "== 0" comparison there, but didn't notice that we later checked it against "== 1". > That said, the public function might have a boolean interface, while > the private wrapper still uses the tristate. I'll address in the next > version. Yeah, I'd be OK with that. Or leaving it as-is, given that there is a caller who cares. It might be less subtle if we used symbolic constants, but that could be done separately (later or never if nobody cares enough). -Peff