]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cache.h: drop duplicate `ensure_full_index()` declaration
authorMartin Ågren <martin.agren@gmail.com>
Mon, 10 Jan 2022 18:41:34 +0000 (19:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Jan 2022 19:30:33 +0000 (11:30 -0800)
There are two identical declarations of `ensure_full_index()` in
cache.h.

Commit 3964fc2aae ("sparse-index: add guard to ensure full index",
2021-03-30) provided an empty implementation of `ensure_full_index()`,
declaring it in a new file sparse-index.h. When commit 4300f8442a
("sparse-index: implement ensure_full_index()", 2021-03-30) fleshed out
the implementation, it added an identical declaration to cache.h.

Then 118a2e8bde ("cache: move ensure_full_index() to cache.h",
2021-04-01) favored having the declaration in cache.h. Because of the
double declaration, at that point we could have just dropped the one in
sparse-index.h, but instead it got moved to cache.h.

As a result, cache.h contains the exact same function declaration twice.
Drop the one under "/* Name hashing */", in favor of the one under
"/* Initialize and use the cache information */".

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Acked-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h

diff --git a/cache.h b/cache.h
index eba12487b99caae71cbd4367e609e156ea9867ff..c7543a1fce1fdbdb2e44954a9ce25794c96e4b26 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -350,8 +350,6 @@ 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 */
 
 /*