update-index: ensure full index
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 1 Apr 2021 01:49:53 +0000 (01:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Apr 2021 20:47:29 +0000 (13:47 -0700)
commit2508df0272fdae3025b53366ac6b456920bc0de0
treebeb982d34a45c40e4e503c7f370d17a1015b63c6
parenta02912019a7a473b039d28713fb6419bf472386f
update-index: ensure full index

Before iterating over all cache entries, ensure that a sparse index is
expanded to a full index to avoid unexpected behavior.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c