aboutsummaryrefslogtreecommitdiff
path: root/sparse-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'sparse-index.c')
-rw-r--r--sparse-index.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sparse-index.c b/sparse-index.c
index 76f90da5f5..13629c075d 100644
--- a/sparse-index.c
+++ b/sparse-index.c
@@ -152,7 +152,9 @@ static int index_has_unmerged_entries(struct index_state *istate)
int is_sparse_index_allowed(struct index_state *istate, int flags)
{
- if (!core_apply_sparse_checkout || !core_sparse_checkout_cone)
+ struct repo_config_values *cfg = repo_config_values(the_repository);
+
+ if (!cfg->apply_sparse_checkout || !core_sparse_checkout_cone)
return 0;
if (!(flags & SPARSE_INDEX_MEMORY_ONLY)) {
@@ -670,7 +672,9 @@ static void clear_skip_worktree_from_present_files_full(struct index_state *ista
void clear_skip_worktree_from_present_files(struct index_state *istate)
{
- if (!core_apply_sparse_checkout ||
+ struct repo_config_values *cfg = repo_config_values(the_repository);
+
+ if (!cfg->apply_sparse_checkout ||
sparse_expect_files_outside_of_patterns)
return;