git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] submodule merge tries to read B's commit from A

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 1, 2026, 14:09 UTC
Message-ID
<ar5ppRMQ8NkGnbGp@pks.im>
In-Reply-To
<764b8c2e-cf09-4531-94f2-268f97a889d7@gmail.com>
On Wed, Sep 30, 2026 at 02:31:44PM -0400, Philippe Blain wrote:
Show 15 quoted lines
> 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
Previous: Philippe BlainNext: Patrick Steinhardt
Message 3 of 4 in “[BUG] submodule merge tries to read B's commit from A”
  1. Guillaume CHAUVELSep 23, 2026
  2. Philippe BlainSep 30, 2026
  3. Patrick SteinhardtOct 1, 2026
  4. Patrick SteinhardtOct 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.