]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cache: move ensure_full_index() to cache.h
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 1 Apr 2021 01:49:41 +0000 (01:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Apr 2021 20:46:41 +0000 (13:46 -0700)
Soon we will insert ensure_full_index() calls across the codebase.
Instead of also adding include statements for sparse-index.h, let's just
use the fact that anything that cares about the index already has
cache.h in its includes.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
sparse-index.h

diff --git a/cache.h b/cache.h
index 5006278c13ca4a52d2b006aa8f2d09db3e4be3e7..b7e20e9778db2cfbf162ac01044883b398e302a8 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -350,6 +350,7 @@ void add_name_hash(struct index_state *istate, struct cache_entry *ce);
 void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
 void free_name_hash(struct index_state *istate);
 
+void ensure_full_index(struct index_state *istate);
 
 /* Cache entry creation and cleanup */
 
index 39dcc859735e2b7e7eab933a98414658266cffe9..0268f38753c03cf5f166d4d13ff6820b46673736 100644 (file)
@@ -2,7 +2,6 @@
 #define SPARSE_INDEX_H__
 
 struct index_state;
-void ensure_full_index(struct index_state *istate);
 int convert_to_sparse(struct index_state *istate);
 
 struct repository;