summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-09-08 01:42:26 +0000
committerJunio C Hamano <gitster@pobox.com>2021-09-07 22:41:09 -0700
commite27eab45c758bf194157b819fae4fd0fcce498fb (patch)
tree607945e29c7a1c69d288b8487fee8ad277dae175 /diff.c
parent522d3cec0089228d0b1a5178c396662953cb2dc2 (diff)
sparse-index: silently return when not using cone-mode patterns
While the sparse-index is only enabled when core.sparseCheckoutCone is also enabled, it is possible for the user to modify the sparse-checkout file manually in a way that does not match cone-mode patterns. In this case, we should refuse to convert an index into a sparse index, since the sparse_checkout_patterns will not be initialized with recursive and parent path hashsets. Also silently return if there are no cache entries, which is a simple case: there are no paths to make sparse! Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions