Git fork

preload-index.h: move declarations for preload-index.c from elsewhere

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>

authored by

Elijah Newren and committed by
Junio C Hamano
fbffdfb1 baf889c2

+27 -6
+1
add-interactive.c
··· 5 5 #include "diffcore.h" 6 6 #include "gettext.h" 7 7 #include "hex.h" 8 + #include "preload-index.h" 8 9 #include "revision.h" 9 10 #include "refs.h" 10 11 #include "string-list.h"
+1
builtin/add.c
··· 17 17 #include "cache-tree.h" 18 18 #include "run-command.h" 19 19 #include "parse-options.h" 20 + #include "preload-index.h" 20 21 #include "diff.h" 21 22 #include "diffcore.h" 22 23 #include "revision.h"
+1
builtin/am.c
··· 29 29 #include "unpack-trees.h" 30 30 #include "branch.h" 31 31 #include "object-name.h" 32 + #include "preload-index.h" 32 33 #include "sequencer.h" 33 34 #include "revision.h" 34 35 #include "merge-recursive.h"
+1
builtin/checkout.c
··· 20 20 #include "object-name.h" 21 21 #include "object-store.h" 22 22 #include "parse-options.h" 23 + #include "preload-index.h" 23 24 #include "refs.h" 24 25 #include "remote.h" 25 26 #include "resolve-undo.h"
+1
builtin/commit.c
··· 30 30 #include "utf8.h" 31 31 #include "object-name.h" 32 32 #include "parse-options.h" 33 + #include "preload-index.h" 33 34 #include "string-list.h" 34 35 #include "rerere.h" 35 36 #include "unpack-trees.h"
+1
builtin/diff-files.c
··· 8 8 #include "diff.h" 9 9 #include "diff-merges.h" 10 10 #include "commit.h" 11 + #include "preload-index.h" 11 12 #include "revision.h" 12 13 #include "builtin.h" 13 14 #include "submodule.h"
+1
builtin/diff-index.c
··· 3 3 #include "diff.h" 4 4 #include "diff-merges.h" 5 5 #include "commit.h" 6 + #include "preload-index.h" 6 7 #include "revision.h" 7 8 #include "builtin.h" 8 9 #include "setup.h"
+1
builtin/diff.c
··· 16 16 #include "diff.h" 17 17 #include "diff-merges.h" 18 18 #include "diffcore.h" 19 + #include "preload-index.h" 19 20 #include "revision.h" 20 21 #include "log-tree.h" 21 22 #include "builtin.h"
+1
builtin/stash.c
··· 17 17 #include "run-command.h" 18 18 #include "dir.h" 19 19 #include "entry.h" 20 + #include "preload-index.h" 20 21 #include "rerere.h" 21 22 #include "revision.h" 22 23 #include "setup.h"
+1
builtin/submodule--helper.c
··· 11 11 #include "parse-options.h" 12 12 #include "quote.h" 13 13 #include "pathspec.h" 14 + #include "preload-index.h" 14 15 #include "dir.h" 15 16 #include "setup.h" 16 17 #include "sparse-index.h"
-3
cache.h
··· 318 318 319 319 /* Initialize and use the cache information */ 320 320 struct lock_file; 321 - void preload_index(struct index_state *index, 322 - const struct pathspec *pathspec, 323 - unsigned int refresh_flags); 324 321 int do_read_index(struct index_state *istate, const char *path, 325 322 int must_exist); /* for testting only! */ 326 323 int read_index_from(struct index_state *, const char *path,
+1
preload-index.c
··· 8 8 #include "fsmonitor.h" 9 9 #include "gettext.h" 10 10 #include "config.h" 11 + #include "preload-index.h" 11 12 #include "progress.h" 12 13 #include "thread-utils.h" 13 14 #include "repository.h"
+15
preload-index.h
··· 1 + #ifndef PRELOAD_INDEX_H 2 + #define PRELOAD_INDEX_H 3 + 4 + struct index_state; 5 + struct pathspec; 6 + struct repository; 7 + 8 + void preload_index(struct index_state *index, 9 + const struct pathspec *pathspec, 10 + unsigned int refresh_flags); 11 + int repo_read_index_preload(struct repository *, 12 + const struct pathspec *pathspec, 13 + unsigned refresh_flags); 14 + 15 + #endif /* PRELOAD_INDEX_H */
+1
read-cache.c
··· 27 27 #include "mem-pool.h" 28 28 #include "name-hash.h" 29 29 #include "object-name.h" 30 + #include "preload-index.h" 30 31 #include "resolve-undo.h" 31 32 #include "revision.h" 32 33 #include "run-command.h"
-3
repository.h
··· 221 221 struct lock_file *lf, 222 222 int flags); 223 223 224 - int repo_read_index_preload(struct repository *, 225 - const struct pathspec *pathspec, 226 - unsigned refresh_flags); 227 224 int repo_read_index_unmerged(struct repository *); 228 225 /* 229 226 * Opportunistically update the index but do not complain if we can't.