Git development
 help / color / mirror / Atom feed
From: Andy Koppe <andy.koppe@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] splitIndex with skipHash corrupts index and crashes status
Date: Sat,  7 Nov 2026 12:11:16 +0000	[thread overview]
Message-ID: <20261107121119.2995843-1-andy.koppe@gmail.com> (raw)

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.

             reply	other threads:[~2026-11-07 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 12:11 Andy Koppe [this message]
2026-11-07 21:10 ` [BUG] splitIndex with skipHash corrupts index and crashes status 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261107121119.2995843-1-andy.koppe@gmail.com \
    --to=andy.koppe@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox