diff mbox series

[v3,04/26] cache: move ensure_full_index() to cache.h

Message ID da17774a53c547374aaf23e6f016d9e54d096f53.1618261697.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 118a2e8bde0982d219607ff9f260b9cfeb25585c
Headers show
Series Sparse Index: API protections | expand

Commit Message

Derrick Stolee April 12, 2021, 9:07 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

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>
---
 cache.h        | 1 +
 sparse-index.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cache.h b/cache.h
index 5006278c13ca..b7e20e9778db 100644
--- 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 */
 
diff --git a/sparse-index.h b/sparse-index.h
index 39dcc859735e..0268f38753c0 100644
--- a/sparse-index.h
+++ b/sparse-index.h
@@ -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;