[PATCH 10/27] fsck: ensure full index
- From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Mar 16, 2021, 21:16 UTC
- Message-ID
- <988f7bd2d7364970a3c192bb229a21ea77803f26.1615929436.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.906.git.1615929435.gitgitgadget@gmail.com>
From: Derrick Stolee <dstolee@microsoft.com>
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 <dstolee@microsoft.com> --- builtin/fsck.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/builtin/fsck.c b/builtin/fsck.c index 821e7798c706..524d3fca28f6 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -883,6 +883,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) verify_index_checksum = 1; verify_ce_order = 1; read_cache(); + ensure_full_index(&the_index); for (i = 0; i < active_nr; i++) { unsigned int mode; struct blob *blob;
-- gitgitgadget