grep: ensure full index
commit46eb6e31ef01684ec2dc64f690a63446022940e5
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 1 Apr 2021 01:49:48 +0000 (1 01:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Apr 2021 20:47:13 +0000 (14 13:47 -0700)
tree76e4727615ea8f54ca91ebc12004bd1b57099e4d
parent2227ea175f9d2660c66f1bf15e2cd1ad75c9d4ca
grep: ensure full index

Before iterating over all cache entries, ensure that a sparse index is
expanded to a full one so we do not miss blobs to scan. Later, this can
integrate more carefully with sparse indexes with proper testing.

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/grep.c