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

Re: [BUG] splitIndex with skipHash corrupts index and crashes status

From
TJTanga Joris <tangajoris@gmail.com>
Date
Nov 7, 2026, 21:10 UTC
Message-ID
<CAKrRMNpaBrOybe0hw_B+RTZ5GWeUASpR+sRte0OLL2x6xJba8g@mail.gmail.com>
In-Reply-To
<20261107121119.2995843-1-andy.koppe@gmail.com>
Hi Andy,
Thank you for the bug report and the clear reproduction steps.
I was able to reproduce both cases on master (fb255012ac).
On Sat, 7 Nov 2026 at 15:16, Andy Koppe <andy.koppe@gmail.com> wrote:
Show 5 quoted lines
>   $ ls .git | grep index
>   index
>   sharedindex.0000000000000000000000000000000000000000
>
> Note the unexpected null OID.

It seems to be caused by write_shared_index() naming the file after the shared index's trailing checksum. With index.skipHash, that checksum is written as zeros, so the file is named sharedindex.0000000000000000000000000000000000000000, which is the file you saw.

The entries disappear because the split index then records a null base, and read_index_from() treats a null base as "no shared index" (read-cache.c:2381), so the entries stored in the shared index are lost.

I'm working on a fix and would be more than happy to send it, unless you are already working on one.

Thanks, Tanga

Previous: Andy KoppeNext: Andy Koppe
Message 2 of 5 in “[BUG] splitIndex with skipHash corrupts index and crashes status”
  1. Andy KoppeNov 7, 2026
  2. Tanga JorisNov 7, 2026
  3. Andy KoppeNov 7, 2026
  4. Tanga JorisNov 7, 2026
  5. read-cache: do not skip the hash of the shared indexTanga Joris, Nov 8, 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.