]> git.ipfire.org Git - thirdparty/git.git/commitdiff
preload-index.h: move declarations for preload-index.c from elsewhere
authorElijah Newren <newren@gmail.com>
Tue, 16 May 2023 06:33:52 +0000 (06:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Jun 2023 20:39:53 +0000 (13:39 -0700)
We already have a preload-index.c file; move the declarations for the
functions in that file into a new preload-index.h.  These were
previously split between cache.h and repository.h.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
add-interactive.c
builtin/add.c
builtin/am.c
builtin/checkout.c
builtin/commit.c
builtin/diff-files.c
builtin/diff-index.c
builtin/diff.c
builtin/stash.c
builtin/submodule--helper.c
cache.h
preload-index.c
preload-index.h [new file with mode: 0644]
read-cache.c
repository.h

index de877ca0525482c9a5a2a6ad9d86e02e5fc79e53..99f7dc3b0d11e13579f7e57d80d5c78d66a034db 100644 (file)
@@ -5,6 +5,7 @@
 #include "diffcore.h"
 #include "gettext.h"
 #include "hex.h"
+#include "preload-index.h"
 #include "revision.h"
 #include "refs.h"
 #include "string-list.h"
index 36ddbb159bf9e5b3c6354dd3f9b15bd971832f31..8397be4f8de8e6550e98879419327d256e6d1f60 100644 (file)
@@ -17,6 +17,7 @@
 #include "cache-tree.h"
 #include "run-command.h"
 #include "parse-options.h"
+#include "preload-index.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "revision.h"
index 5c83f2e003fb01ab6409a23e3a79ab15e4aed6f2..0d8f46f8d5a276b963f4f92c84aec7983261b487 100644 (file)
@@ -29,6 +29,7 @@
 #include "unpack-trees.h"
 #include "branch.h"
 #include "object-name.h"
+#include "preload-index.h"
 #include "sequencer.h"
 #include "revision.h"
 #include "merge-recursive.h"
index d6765c9dbd9a5eb82dc8dc32e1378584c63326e0..2d72a742d9de0db66b0cae05701f755028f79934 100644 (file)
@@ -20,6 +20,7 @@
 #include "object-name.h"
 #include "object-store.h"
 #include "parse-options.h"
+#include "preload-index.h"
 #include "refs.h"
 #include "remote.h"
 #include "resolve-undo.h"
index ee296e5ec6e595b8c7aca61a350bdd716f86c6b5..877955e8948ea209587dea8d57b928ccb3151692 100644 (file)
@@ -30,6 +30,7 @@
 #include "utf8.h"
 #include "object-name.h"
 #include "parse-options.h"
+#include "preload-index.h"
 #include "string-list.h"
 #include "rerere.h"
 #include "unpack-trees.h"
index 360464e6ef2dc4a2a613c4e8f8a59e2237a7d327..3ac175264d90eb2bd52a5bbd6e67960aa8034aa1 100644 (file)
@@ -8,6 +8,7 @@
 #include "diff.h"
 #include "diff-merges.h"
 #include "commit.h"
+#include "preload-index.h"
 #include "revision.h"
 #include "builtin.h"
 #include "submodule.h"
index b9a19bb7d38074a907369c74b9cd72c98ac208c7..9b98db2e77ed8ec0be082088be81c872dc56020a 100644 (file)
@@ -3,6 +3,7 @@
 #include "diff.h"
 #include "diff-merges.h"
 #include "commit.h"
+#include "preload-index.h"
 #include "revision.h"
 #include "builtin.h"
 #include "setup.h"
index 7b64659fe79301fcf5d6c34e12e09cc8b6089f1c..967550739a625058628b3a68197c996870e516e9 100644 (file)
@@ -16,6 +16,7 @@
 #include "diff.h"
 #include "diff-merges.h"
 #include "diffcore.h"
+#include "preload-index.h"
 #include "revision.h"
 #include "log-tree.h"
 #include "builtin.h"
index 8856ac6d5c7fdb46bfb11eebd86d53ffe26fe6c5..06527ee84717acd3fcb956a231c39a8c6d2e88b8 100644 (file)
@@ -17,6 +17,7 @@
 #include "run-command.h"
 #include "dir.h"
 #include "entry.h"
+#include "preload-index.h"
 #include "rerere.h"
 #include "revision.h"
 #include "setup.h"
index fa309595359796820137b1edfcf17aa859fb2348..7b201d76a8b56f20df7d3a34b19f8048ba815b68 100644 (file)
@@ -11,6 +11,7 @@
 #include "parse-options.h"
 #include "quote.h"
 #include "pathspec.h"
+#include "preload-index.h"
 #include "dir.h"
 #include "setup.h"
 #include "sparse-index.h"
diff --git a/cache.h b/cache.h
index 79daaa166b1258a629052b60e6564bef870729f9..b79802a4639ab1b5eaf0b289e3624b570607ba18 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -318,9 +318,6 @@ extern struct index_state the_index;
 
 /* Initialize and use the cache information */
 struct lock_file;
-void preload_index(struct index_state *index,
-                  const struct pathspec *pathspec,
-                  unsigned int refresh_flags);
 int do_read_index(struct index_state *istate, const char *path,
                  int must_exist); /* for testting only! */
 int read_index_from(struct index_state *, const char *path,
index 7a26b08c2133d428c59ff46485c0211afe52a06d..c26739debf85b79a09d1e01343fd8e646890b023 100644 (file)
@@ -8,6 +8,7 @@
 #include "fsmonitor.h"
 #include "gettext.h"
 #include "config.h"
+#include "preload-index.h"
 #include "progress.h"
 #include "thread-utils.h"
 #include "repository.h"
diff --git a/preload-index.h b/preload-index.h
new file mode 100644 (file)
index 0000000..251b1ed
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef PRELOAD_INDEX_H
+#define PRELOAD_INDEX_H
+
+struct index_state;
+struct pathspec;
+struct repository;
+
+void preload_index(struct index_state *index,
+                  const struct pathspec *pathspec,
+                  unsigned int refresh_flags);
+int repo_read_index_preload(struct repository *,
+                           const struct pathspec *pathspec,
+                           unsigned refresh_flags);
+
+#endif /* PRELOAD_INDEX_H */
index e1016ae0317c5311f2181c877486d42e461edb38..3fad839fb6f81ba9d081bb54ffb9ce54bd05645a 100644 (file)
@@ -27,6 +27,7 @@
 #include "mem-pool.h"
 #include "name-hash.h"
 #include "object-name.h"
+#include "preload-index.h"
 #include "resolve-undo.h"
 #include "revision.h"
 #include "run-command.h"
index 74ae26635a4983b4a3c78ed4ea2f4f92b04767c2..655a95026d3d115d5b658d967da8ce79487caf9d 100644 (file)
@@ -221,9 +221,6 @@ int repo_hold_locked_index(struct repository *repo,
                           struct lock_file *lf,
                           int flags);
 
-int repo_read_index_preload(struct repository *,
-                           const struct pathspec *pathspec,
-                           unsigned refresh_flags);
 int repo_read_index_unmerged(struct repository *);
 /*
  * Opportunistically update the index but do not complain if we can't.