From: Patrick Steinhardt Date: Thu, 01 Oct 2026 14:09:41 GMT Subject: Re: [BUG] submodule merge tries to read B's commit from A Message-ID: In-Reply-To: <764b8c2e-cf09-4531-94f2-268f97a889d7@gmail.com> 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. Thanks! Patrick