]> git.ipfire.org Git - thirdparty/git.git/commitdiff
sparse-index: expose 'is_sparse_index_allowed()'
authorVictoria Dye <vdye@github.com>
Tue, 10 May 2022 23:32:29 +0000 (23:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 May 2022 23:45:12 +0000 (16:45 -0700)
Expose 'is_sparse_index_allowed()' publicly so that it may be used by
callers outside of 'sparse-index.c'. While no such callers exist yet, it
will be used in a subsequent commit.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sparse-index.c
sparse-index.h

index 8636af72de59f38ff9de871c34bd44f8aab75286..ffbab7d35f1d1681a23bfd50da7401b315739451 100644 (file)
@@ -118,7 +118,7 @@ static int index_has_unmerged_entries(struct index_state *istate)
        return 0;
 }
 
-static int is_sparse_index_allowed(struct index_state *istate, int flags)
+int is_sparse_index_allowed(struct index_state *istate, int flags)
 {
        if (!core_apply_sparse_checkout || !core_sparse_checkout_cone)
                return 0;
index 633d4fb7e318afcd69257e5d85850138da9d7348..f57c65d972f474a38a8add549248df834a157c06 100644 (file)
@@ -3,6 +3,7 @@
 
 struct index_state;
 #define SPARSE_INDEX_MEMORY_ONLY (1 << 0)
+int is_sparse_index_allowed(struct index_state *istate, int flags);
 int convert_to_sparse(struct index_state *istate, int flags);
 void ensure_correct_sparsity(struct index_state *istate);
 void clear_skip_worktree_from_present_files(struct index_state *istate);