From: Derrick Stolee Date: Thu, 1 Apr 2021 01:49:47 +0000 (+0000) Subject: fsck: ensure full index X-Git-Tag: v2.32.0-rc0~59^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2227ea175f9d2660c66f1bf15e2cd1ad75c9d4ca;p=thirdparty%2Fgit.git fsck: ensure full index When verifying all blobs reachable from the index, ensure that a sparse index has been expanded to a full one to avoid missing some blobs. Signed-off-by: Derrick Stolee Reviewed-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff --git a/builtin/fsck.c b/builtin/fsck.c index 821e7798c7..4d7f5c63ce 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -883,6 +883,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) verify_index_checksum = 1; verify_ce_order = 1; read_cache(); + /* TODO: audit for interaction with sparse-index. */ + ensure_full_index(&the_index); for (i = 0; i < active_nr; i++) { unsigned int mode; struct blob *blob;