fsmonitor: integrate with sparse index
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 21 May 2021 11:59:41 +0000 (11:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 22 May 2021 08:58:19 +0000 (17:58 +0900)
commitdf254305ad83d2627e1a5248a2bf8357a147bfb6
tree31f63bafe194160b5c9cf6ccdc8b36d3f4574977
parentb025501e89694e43455f55146114b7b69d1150b9
fsmonitor: integrate with sparse index

If we need to expand a sparse-index into a full one, then the FS Monitor
bitmap is going to be incorrect. Ensure that we start fresh at such an
event.

While this is currently a performance drawback, the eventual hope of the
sparse-index feature is that these expansions will be rare and hence we
will be able to keep the FS Monitor data accurate across multiple Git
commands.

These tests are added to demonstrate that the behavior is the same
across a full index and a sparse index, but also that file modifications
to a tracked directory outside of the sparse cone will trigger
ensure_full_index().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sparse-index.c
t/t7519-status-fsmonitor.sh