Browse Source

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 <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Derrick Stolee 4 years ago committed by Junio C Hamano
parent
commit
2227ea175f
  1. 2
      builtin/fsck.c

2
builtin/fsck.c

@ -883,6 +883,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) @@ -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;

Loading…
Cancel
Save