]> git.ipfire.org Git - thirdparty/git.git/commitdiff
name-hash.h: move declarations for name-hash.c from cache.h
authorElijah Newren <newren@gmail.com>
Tue, 16 May 2023 06:33:50 +0000 (06:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Jun 2023 20:39:53 +0000 (13:39 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
apply.c
builtin/mv.c
cache.h
dir.c
entry.c
merge-recursive.c
name-hash.c
name-hash.h [new file with mode: 0644]
read-cache.c
sparse-index.c
t/helper/test-lazy-init-name-hash.c
unpack-trees.c

diff --git a/apply.c b/apply.c
index 6212ab3a1b3958cd56c8c3e199a3f0ed35de1488..3da33bb88fde0fc55695bb345fd29cb66898c6eb 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -23,6 +23,7 @@
 #include "xdiff-interface.h"
 #include "ll-merge.h"
 #include "lockfile.h"
+#include "name-hash.h"
 #include "object-name.h"
 #include "object-file.h"
 #include "parse-options.h"
index 665bd274485f6c76403e9230539e2650073a47f3..e058b5746544ec3102c3d3a2d4d5f9a5e01ee227 100644 (file)
@@ -11,6 +11,7 @@
 #include "config.h"
 #include "environment.h"
 #include "gettext.h"
+#include "name-hash.h"
 #include "object-file.h"
 #include "pathspec.h"
 #include "lockfile.h"
diff --git a/cache.h b/cache.h
index d31b15150693d8bb9c1c885836461b6c085c4f34..316904da3920ce86db1fb626fe279eee6a3baa72 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -245,12 +245,6 @@ struct index_state {
 void index_state_init(struct index_state *istate, struct repository *r);
 void release_index(struct index_state *istate);
 
-/* Name hashing */
-int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
-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);
-
 /* Cache entry creation and cleanup */
 
 /*
@@ -377,9 +371,6 @@ int repo_index_has_changes(struct repository *repo,
 
 int verify_path(const char *path, unsigned mode);
 int strcmp_offset(const char *s1, const char *s2, size_t *first_change);
-int index_dir_exists(struct index_state *istate, const char *name, int namelen);
-void adjust_dirname_case(struct index_state *istate, char *name);
-struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
 
 /*
  * Searches for an entry defined by name and namelen in the given index.
diff --git a/dir.c b/dir.c
index a7469df3ac7f95109c48ced53259aac021e14b8b..029aab36fe8cbe78f36bfd0e449b866a3f94baf7 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -13,6 +13,7 @@
 #include "dir.h"
 #include "environment.h"
 #include "gettext.h"
+#include "name-hash.h"
 #include "object-file.h"
 #include "object-store.h"
 #include "attr.h"
diff --git a/entry.c b/entry.c
index 91a540bd29fac2320ab214020cdcc58fee0412b4..7791cc999cc970f4bc81c2140cf0b3c9af1a8b4f 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -5,6 +5,7 @@
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
+#include "name-hash.h"
 #include "streaming.h"
 #include "submodule.h"
 #include "symlinks.h"
index 8e87b6386d9f7aee03ba63ee005122eb5d2556b7..b341ba4f38db62331254bb5970a5738ff006de51 100644 (file)
@@ -23,6 +23,7 @@
 #include "ll-merge.h"
 #include "lockfile.h"
 #include "match-trees.h"
+#include "name-hash.h"
 #include "object-file.h"
 #include "object-name.h"
 #include "object-store.h"
index fb13716e4303ebc7c96caa49934ca67f61ae772e..52ce47ea394b0d9772e34a6ed338ef8d1ff736e9 100644 (file)
@@ -8,6 +8,7 @@
 #include "cache.h"
 #include "environment.h"
 #include "gettext.h"
+#include "name-hash.h"
 #include "thread-utils.h"
 #include "trace.h"
 #include "trace2.h"
diff --git a/name-hash.h b/name-hash.h
new file mode 100644 (file)
index 0000000..b1b4b0f
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef NAME_HASH_H
+#define NAME_HASH_H
+
+struct cache_entry;
+struct index_state;
+
+int index_dir_exists(struct index_state *istate, const char *name, int namelen);
+void adjust_dirname_case(struct index_state *istate, char *name);
+struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int igncase);
+
+int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
+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);
+
+#endif /* NAME_HASH_H */
index b99dbfd16b0d4fe9ba02c48e7152a3b2e6a50793..e1016ae0317c5311f2181c877486d42e461edb38 100644 (file)
@@ -25,6 +25,7 @@
 #include "environment.h"
 #include "gettext.h"
 #include "mem-pool.h"
+#include "name-hash.h"
 #include "object-name.h"
 #include "resolve-undo.h"
 #include "revision.h"
index 886054729e5e343f664d81da5c5ad6b48cf06e8a..60451daae80d9bb344b4b27d317ae6212a11cc8b 100644 (file)
@@ -2,6 +2,7 @@
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
+#include "name-hash.h"
 #include "repository.h"
 #include "sparse-index.h"
 #include "tree.h"
index b83a75d19f6c3d665219361bb15f5512ebb0e357..6944b7e825f72badcf807ffc9967e22a055bf954 100644 (file)
@@ -2,6 +2,7 @@
 #include "test-tool.h"
 #include "cache.h"
 #include "environment.h"
+#include "name-hash.h"
 #include "parse-options.h"
 #include "repository.h"
 #include "setup.h"
index e8c32a40dcba5e8e7cb1dc7f0661953473db350e..078c53f7a1378527d40eba436665fbc32504fa1e 100644 (file)
@@ -7,6 +7,7 @@
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
+#include "name-hash.h"
 #include "tree.h"
 #include "tree-walk.h"
 #include "cache-tree.h"