]> git.ipfire.org Git - thirdparty/git.git/commit
checkout-index: ensure full index
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 1 Apr 2021 01:49:43 +0000 (01:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Apr 2021 20:46:59 +0000 (13:46 -0700)
commit1b850d37f42d58d1c4ad1454d80ecf33797bc467
tree7ce46019e5ea36a20529e782f03d1b722ff0e783
parent54beed24d22867a98fc247e1031e3486573f1553
checkout-index: ensure full index

Before we iterate over all cache entries, ensure that the index is not
sparse. This loop in checkout_all() might be safe to iterate over a
sparse index, but let's put this protection here until it can be
carefully tested.

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/checkout-index.c