mirror of
https://github.com/git/git.git
synced 2024-09-21 12:02:17 +02:00
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>
This commit is contained in:
parent
48b3c7da6c
commit
2227ea175f
@ -883,6 +883,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
|
|||||||
verify_index_checksum = 1;
|
verify_index_checksum = 1;
|
||||||
verify_ce_order = 1;
|
verify_ce_order = 1;
|
||||||
read_cache();
|
read_cache();
|
||||||
|
/* TODO: audit for interaction with sparse-index. */
|
||||||
|
ensure_full_index(&the_index);
|
||||||
for (i = 0; i < active_nr; i++) {
|
for (i = 0; i < active_nr; i++) {
|
||||||
unsigned int mode;
|
unsigned int mode;
|
||||||
struct blob *blob;
|
struct blob *blob;
|
||||||
|
Loading…
Reference in New Issue
Block a user