Re: [BUG] submodule merge tries to read B's commit from A
On Thu, Oct 01, 2026 at 04:09:41PM +0200, Patrick Steinhardt wrote:
Show 20 quoted lines
> On Wed, Sep 30, 2026 at 02:31:44PM -0400, Philippe Blain wrote:
> > I did not yet dig further, but I have a few additional observations:
> >
> > - in contrast to the commit-graph bug, disabling the use of commit-graphs via
> > 'git config --global core.commitGraph false' early in the script, by moving the 'tmpdir'
> > definition to the top and setting GIT_CONFIG_GLOBAL=$tmpdir/.gitconfig, does not change
> > the behaviour, neither in the "repository corrupt" case, nor in the "hash mismatch" case.
> > - On Ubuntu 22.02 under WSL, the reproducer does not trigger the bug on v2.56.0-rc2 (on a dozen runs),
> > but it does trigger it on v2.55.0. Funnily on that system with v2.56.0-rc2 I get the correct behaviour !
> > (no "hash mismatch" either).
> > - On a Ubuntu 22.04 Docker container, I get the same behaviour as on RHEL 9.
> >
> > > An AI analysis identified a likely cause: a delta-base cache entry may
> > > remain after its pack is closed. If a pack from another submodule reuses
> > > the same packed_git address and base offset, Git may return stale cached
> > > data.
>
> Yup, that seems to be the issue indeed. We should really be clearing
> packfiles out of the delta base cache when closing packfiles, but we
> don't right now. I'll investigate tomorrow.
I've sent [1] now to fix this issue. Thanks!
Patrick
[1]: <20261002-pks-packfile-stale-delta-base-cache-v1-0-7592a3e31ae0@pks.im>