Subject: Re: [PATCH 07/12] pseudo-merge: fix disk reads from find_pseudo_merge()

From: Taylor Blau <[email-masked]>
Date: Thu, 2 Apr 2026 19:51:47 -0400

On Tue, Mar 31, 2026 at 07:56:37PM -0400, Jeff King wrote:
> On Tue, Mar 31, 2026 at 07:46:23PM -0400, Jeff King wrote:
>
> > So I think there is something wrong or missing from the test setup, and
> > this bears further investigation. Sadly the answer to the second part
> > ("does it work now") is still "no idea". I _think_ this takes us in a
> > positive direction, but my goal here is mainly to quiet the compiler
> > warning. Further bug-hunting on this experimental feature can be done
> > separately.
>
> If this is the wrong direction or if we just want to keep things minimal
> in this patch series, the absolute smallest fix is probably to cast away
> the constness explicitly in find_pseudo_merge(), along with a comment
> that the fix is almost certainly wrong. ;)

This approach makes the most sense to me as a band-aid fix to squelch
the Coverity warnings.

I pulled on this thread a little bit over the past couple of evenings
and found a fair number of pseudo-merge related bugs / oddities that I'd
like to fix more comprehensively.

But this is makes sense as a first step to quiet the noise from Coverity
without rushing the other fixes.

Thanks,
Taylor