git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] splitIndex with skipHash corrupts index and crashes status
@ 2026-11-07 12:11 Andy Koppe
  2026-11-07 21:10 ` Tanga Joris
  2026-11-08 23:42 ` [Outreachy PATCH] read-cache: do not skip the hash of the shared index Tanga Joris
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Koppe @ 2026-11-07 12:11 UTC (permalink / raw)
  To: git

With both core.splitIndex and index.skipHash enabled (the latter e.g.
via feature.manyFiles), index entries are silently lost or corrupted
whenever the shared index is written.

  $ git init -q r && cd r
  $ git config core.splitIndex true
  $ touch foo bar && git add . && git commit -qm init
  $ git config index.skipHash true
  $ git update-index --split-index
  $ git ls-files
  ./
  ./
  $ git status --short
  BUG: wt-status.c:585: multiple renames on the same target? how?
  Aborted (core dumped)

Without the explicit --split-index, this happens once the shared index
is rewritten because enough entries have changed.

In a new repository, the first git add writes a shared index, and the
added entry is lost straight away:

  $ git init -q r && cd r
  $ git config core.splitIndex true
  $ git config index.skipHash true
  $ touch foo && git add foo
  $ git status --short
  ?? foo
  $ ls .git | grep index
  index
  sharedindex.0000000000000000000000000000000000000000

Note the unexpected null OID.

Seen with v2.56.0 on x86_64 Linux.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-08 23:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 12:11 [BUG] splitIndex with skipHash corrupts index and crashes status Andy Koppe
2026-11-07 21:10 ` Tanga Joris
2026-11-07 21:55   ` Andy Koppe
2026-11-07 22:24     ` Tanga Joris
2026-11-08 23:42 ` [Outreachy PATCH] read-cache: do not skip the hash of the shared index Tanga Joris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).