fsck: check index files in all worktrees
commitfb64ca526a7c695aa137c2d2577585ddea5cce28
authorJeff King <peff@peff.net>
Fri, 24 Feb 2023 08:09:57 +0000 (24 03:09 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Feb 2023 17:32:23 +0000 (24 09:32 -0800)
tree3b7a3db7b3d2a7bd1f5be66ecfa73747b4cbe0e2
parent8840069a37e69129ed3c2792ddb172557f98e205
fsck: check index files in all worktrees

We check the index file for the main worktree, but completely ignore the
index files in other worktrees. These should be checked, too, as they
are part of the repository state (and in particular, errors in those
index files may cause repo-wide operations like "git gc" to complain).

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c
t/t1450-fsck.sh