Re: [BUG] splitIndex with skipHash corrupts index and crashes status
On Sat, 7 Nov 2026 at 21:11, Tanga Joris wrote:
Show 19 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.
Thank you very much for looking into this! I haven't dared wading into it.
Andy