cache.h: remove this no-longer-used header
Since this header showed up in some places besides just #include statements, update/clean-up/remove those other places as well. Note that compat/fsmonitor/fsm-path-utils-darwin.c previously got away with violating the rule that all files must start with an include of git-compat-util.h (or a short-list of alternate headers that happen to include it first). This change exposed the violation and caused it to stop building correctly; fix it by having it include git-compat-util.h first, as per policy. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
May 16, 2023 at 06:33 UTC
bc5c5ec0446895f5c4139cd470066beb3c4ac6d5
150 files changed
+100
-206
Documentation/CodingGuidelines
+1
-1
@@ -444,7 +444,7 @@ For C programs:
444
- The first #include in C files, except in platform specific compat/
445
implementations and sha1dc/, must be either "git-compat-util.h" or
446
one of the approved headers that includes it first for you. (The
447
- approved headers currently include "cache.h", "builtin.h",
447
+ approved headers currently include "builtin.h",
448
"t/helper/test-tool.h", "xdiff/xinclude.h", or
449
"reftable/system.h"). You do not have to include more than one of
450
these.
Documentation/MyFirstObjectWalk.txt
+1
-1
@@ -124,7 +124,7 @@ parameters provided by the user over the CLI.
124
125
`nr` represents the number of `rev_cmdline_entry` present in the array.
126
127
-`alloc` is used by the `ALLOC_GROW` macro. Check `cache.h` - this variable is
127
+`alloc` is used by the `ALLOC_GROW` macro. Check `alloc.h` - this variable is
128
used to track the allocated size of the list.
129
130
Per entry, we find:
Documentation/user-manual.txt
+8
-10
@@ -4129,13 +4129,11 @@ Note that terminology has changed since that revision. For example, the
4129
README in that revision uses the word "changeset" to describe what we
4130
now call a <<def_commit_object,commit>>.
4131
4132
-Also, we do not call it "cache" any more, but rather "index"; however, the
4133
-file is still called `cache.h`. Remark: Not much reason to change it now,
4134
-especially since there is no good single name for it anyway, because it is
4135
-basically _the_ header file which is included by _all_ of Git's C sources.
4132
+Also, we do not call it "cache" any more, but rather "index"; however,
4133
+the file is still called `read-cache.h`.
4134
4135
If you grasp the ideas in that initial commit, you should check out a
4138
-more recent version and skim `cache.h`, `object.h` and `commit.h`.
4136
+more recent version and skim `read-cache-ll.h`, `object.h` and `commit.h`.
4137
4138
In the early days, Git (in the tradition of UNIX) was a bunch of programs
4139
which were extremely simple, and which you used in scripts, piping the
@@ -4146,11 +4144,11 @@ many of these parts have become builtins, and some of the core has been
4144
and to avoid code duplication.
4145
4146
By now, you know what the index is (and find the corresponding data
4149
-structures in `cache.h`), and that there are just a couple of object types
4150
-(blobs, trees, commits and tags) which inherit their common structure from
4151
-`struct object`, which is their first member (and thus, you can cast e.g.
4152
-`(struct object *)commit` to achieve the _same_ as `&commit->object`, i.e.
4153
-get at the object name and flags).
4147
+structures in `read-cache-ll.h`), and that there are just a couple of
4148
+object types (blobs, trees, commits and tags) which inherit their
4149
+common structure from `struct object`, which is their first member
4150
+(and thus, you can cast e.g. `(struct object *)commit` to achieve the
4151
+_same_ as `&commit->object`, i.e. get at the object name and flags).
4152
4153
Now is a good point to take a break to let this information sink in.
4154
Makefile
+1
-1
@@ -1952,7 +1952,7 @@ endif
1952
BASIC_CFLAGS += \
1953
-DSHA1DC_NO_STANDARD_INCLUDES \
1954
-DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 \
1955
- -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" \
1955
+ -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"git-compat-util.h\"" \
1956
-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\""
1957
endif
1958
endif
add-interactive.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "add-interactive.h"
3
#include "color.h"
4
#include "config.h"
add-patch.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "add-interactive.h"
3
#include "advice.h"
4
#include "alloc.h"
apply.c
+1
-1
@@ -7,7 +7,7 @@
7
*
8
*/
9
10
-#include "cache.h"
10
+#include "git-compat-util.h"
11
#include "abspath.h"
12
#include "alloc.h"
13
#include "base85.h"
attr.c
+1
-1
@@ -6,7 +6,7 @@
6
* an insanely large number of attributes.
7
*/
8
9
-#include "cache.h"
9
+#include "git-compat-util.h"
10
#include "alloc.h"
11
#include "config.h"
12
#include "environment.h"
blame.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "refs.h"
3
#include "object-store.h"
4
#include "cache-tree.h"
builtin.h
-1
@@ -3,7 +3,6 @@
3
4
#include "git-compat-util.h"
5
#include "strbuf.h"
6
-#include "cache.h"
6
#include "commit.h"
7
8
/*
builtin/add.c
+1
-2
@@ -4,10 +4,9 @@
4
* Copyright (C) 2006 Linus Torvalds
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "advice.h"
9
#include "config.h"
10
-#include "builtin.h"
10
#include "lockfile.h"
11
#include "editor.h"
12
#include "dir.h"
builtin/am.c
+1
-2
@@ -4,11 +4,10 @@
4
* Based on git-am.sh by Junio C Hamano.
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "abspath.h"
9
#include "advice.h"
10
#include "config.h"
11
-#include "builtin.h"
11
#include "editor.h"
12
#include "environment.h"
13
#include "exec-cmd.h"
builtin/apply.c
-1
@@ -1,4 +1,3 @@
1
-#include "cache.h"
1
#include "builtin.h"
2
#include "gettext.h"
3
#include "parse-options.h"
builtin/archive.c
-1
@@ -2,7 +2,6 @@
2
* Copyright (c) 2006 Franck Bui-Huu
3
* Copyright (c) 2006 Rene Scharfe
4
*/
5
-#include "cache.h"
5
#include "builtin.h"
6
#include "archive.h"
7
#include "gettext.h"
builtin/bisect.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "copy.h"
3
#include "environment.h"
4
#include "gettext.h"
builtin/branch.c
+1
-2
@@ -5,14 +5,13 @@
5
* Based on git-branch.sh by Junio C Hamano.
6
*/
7
8
-#include "cache.h"
8
+#include "builtin.h"
9
#include "config.h"
10
#include "color.h"
11
#include "editor.h"
12
#include "environment.h"
13
#include "refs.h"
14
#include "commit.h"
15
-#include "builtin.h"
15
#include "gettext.h"
16
#include "object-name.h"
17
#include "remote.h"
builtin/bundle.c
-1
@@ -6,7 +6,6 @@
6
#include "parse-options.h"
7
#include "pkt-line.h"
8
#include "repository.h"
9
-#include "cache.h"
9
#include "bundle.h"
10
11
/*
builtin/cat-file.c
+1
-2
@@ -4,11 +4,10 @@
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "alloc.h"
9
#include "config.h"
10
#include "convert.h"
11
-#include "builtin.h"
11
#include "diff.h"
12
#include "environment.h"
13
#include "gettext.h"
builtin/check-attr.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "builtin.h"
3
-#include "cache.h"
3
#include "config.h"
4
#include "attr.h"
5
#include "environment.h"
builtin/check-ignore.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "builtin.h"
3
-#include "cache.h"
3
#include "config.h"
4
#include "dir.h"
5
#include "gettext.h"
builtin/check-ref-format.c
+1
-2
@@ -2,9 +2,8 @@
2
* GIT - The information manager from hell
3
*/
4
5
-#include "cache.h"
6
-#include "refs.h"
5
#include "builtin.h"
6
+#include "refs.h"
7
#include "setup.h"
8
#include "strbuf.h"
9
builtin/clean.c
-1
@@ -9,7 +9,6 @@
9
#define USE_THE_INDEX_VARIABLE
10
#include "builtin.h"
11
#include "abspath.h"
12
-#include "cache.h"
12
#include "config.h"
13
#include "dir.h"
14
#include "gettext.h"
builtin/column.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "strbuf.h"
builtin/commit-tree.c
+1
-2
@@ -3,7 +3,7 @@
3
*
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
-#include "cache.h"
6
+#include "builtin.h"
7
#include "config.h"
8
#include "gettext.h"
9
#include "hex.h"
@@ -12,7 +12,6 @@
12
#include "repository.h"
13
#include "commit.h"
14
#include "tree.h"
15
-#include "builtin.h"
15
#include "utf8.h"
16
#include "gpg-interface.h"
17
#include "parse-options.h"
builtin/commit.c
+1
-2
@@ -6,7 +6,7 @@
6
*/
7
8
#define USE_THE_INDEX_VARIABLE
9
-#include "cache.h"
9
+#include "builtin.h"
10
#include "advice.h"
11
#include "config.h"
12
#include "lockfile.h"
@@ -15,7 +15,6 @@
15
#include "dir.h"
16
#include "editor.h"
17
#include "environment.h"
18
-#include "builtin.h"
18
#include "diff.h"
19
#include "diffcore.h"
20
#include "commit.h"
builtin/count-objects.c
+1
-2
@@ -4,13 +4,12 @@
4
* Copyright (c) 2006 Junio C Hamano
5
*/
6
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "config.h"
9
#include "dir.h"
10
#include "environment.h"
11
#include "gettext.h"
12
#include "repository.h"
13
-#include "builtin.h"
13
#include "parse-options.h"
14
#include "quote.h"
15
#include "packfile.h"
builtin/describe.c
+1
-2
@@ -1,5 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
-#include "cache.h"
2
+#include "builtin.h"
3
#include "config.h"
4
#include "environment.h"
5
#include "gettext.h"
@@ -9,7 +9,6 @@
9
#include "tag.h"
10
#include "blob.h"
11
#include "refs.h"
12
-#include "builtin.h"
12
#include "exec-cmd.h"
13
#include "object-name.h"
14
#include "parse-options.h"
builtin/diff-files.c
+1
-2
@@ -3,14 +3,13 @@
3
*
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
-#include "cache.h"
6
+#include "builtin.h"
7
#include "config.h"
8
#include "diff.h"
9
#include "diff-merges.h"
10
#include "commit.h"
11
#include "preload-index.h"
12
#include "revision.h"
13
-#include "builtin.h"
13
#include "submodule.h"
14
15
static const char diff_files_usage[] =
builtin/diff-index.c
+1
-2
@@ -1,11 +1,10 @@
1
-#include "cache.h"
1
+#include "builtin.h"
2
#include "config.h"
3
#include "diff.h"
4
#include "diff-merges.h"
5
#include "commit.h"
6
#include "preload-index.h"
7
#include "revision.h"
8
-#include "builtin.h"
8
#include "setup.h"
9
#include "submodule.h"
10
builtin/diff-tree.c
+1
-2
@@ -1,12 +1,11 @@
1
#define USE_THE_INDEX_VARIABLE
2
-#include "cache.h"
2
+#include "builtin.h"
3
#include "config.h"
4
#include "diff.h"
5
#include "commit.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "log-tree.h"
9
-#include "builtin.h"
9
#include "submodule.h"
10
#include "read-cache-ll.h"
11
#include "repository.h"
builtin/diff.c
+1
-2
@@ -4,7 +4,7 @@
4
* Copyright (c) 2006 Junio C Hamano
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "config.h"
9
#include "ewah/ewok.h"
10
#include "lockfile.h"
@@ -20,7 +20,6 @@
20
#include "read-cache-ll.h"
21
#include "revision.h"
22
#include "log-tree.h"
23
-#include "builtin.h"
23
#include "setup.h"
24
#include "submodule.h"
25
#include "oid-array.h"
builtin/difftool.c
+1
-2
@@ -12,11 +12,10 @@
12
* Copyright (C) 2016 Johannes Schindelin
13
*/
14
#define USE_THE_INDEX_VARIABLE
15
-#include "cache.h"
15
+#include "builtin.h"
16
#include "abspath.h"
17
#include "config.h"
18
#include "copy.h"
19
-#include "builtin.h"
19
#include "run-command.h"
20
#include "environment.h"
21
#include "exec-cmd.h"
builtin/fast-export.c
-1
@@ -4,7 +4,6 @@
4
* Copyright (C) 2007 Johannes E. Schindelin
5
*/
6
#include "builtin.h"
7
-#include "cache.h"
7
#include "config.h"
8
#include "gettext.h"
9
#include "hex.h"
builtin/fast-import.c
-1
@@ -1,6 +1,5 @@
1
#include "builtin.h"
2
#include "abspath.h"
3
-#include "cache.h"
3
#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
builtin/fetch.c
+1
-2
@@ -1,7 +1,7 @@
1
/*
2
* "git fetch"
3
*/
4
-#include "cache.h"
4
+#include "builtin.h"
5
#include "advice.h"
6
#include "config.h"
7
#include "gettext.h"
@@ -15,7 +15,6 @@
15
#include "oidset.h"
16
#include "oid-array.h"
17
#include "commit.h"
18
-#include "builtin.h"
18
#include "string-list.h"
19
#include "remote.h"
20
#include "transport.h"
builtin/for-each-ref.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "refs.h"
builtin/for-each-repo.c
+1
-2
@@ -1,6 +1,5 @@
1
-#include "cache.h"
2
-#include "config.h"
1
#include "builtin.h"
2
+#include "config.h"
3
#include "gettext.h"
4
#include "parse-options.h"
5
#include "path.h"
builtin/fsck.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "gettext.h"
3
#include "hex.h"
4
#include "repository.h"
builtin/get-tar-commit-id.c
+1
-2
@@ -1,10 +1,9 @@
1
/*
2
* Copyright (c) 2005, 2006 Rene Scharfe
3
*/
4
-#include "cache.h"
4
+#include "builtin.h"
5
#include "commit.h"
6
#include "tar.h"
7
-#include "builtin.h"
7
#include "quote.h"
8
#include "wrapper.h"
9
builtin/grep.c
+1
-2
@@ -3,7 +3,7 @@
3
*
4
* Copyright (c) 2006 Junio C Hamano
5
*/
6
-#include "cache.h"
6
+#include "builtin.h"
7
#include "alloc.h"
8
#include "gettext.h"
9
#include "hex.h"
@@ -14,7 +14,6 @@
14
#include "commit.h"
15
#include "tag.h"
16
#include "tree-walk.h"
17
-#include "builtin.h"
17
#include "parse-options.h"
18
#include "string-list.h"
19
#include "run-command.h"
builtin/help.c
+1
-2
@@ -1,9 +1,8 @@
1
/*
2
* Builtin help command
3
*/
4
-#include "cache.h"
5
-#include "config.h"
4
#include "builtin.h"
5
+#include "config.h"
6
#include "exec-cmd.h"
7
#include "gettext.h"
8
#include "pager.h"
builtin/hook.c
-1
@@ -1,4 +1,3 @@
1
-#include "cache.h"
1
#include "builtin.h"
2
#include "config.h"
3
#include "gettext.h"
builtin/init-db.c
+1
-2
@@ -3,12 +3,11 @@
3
*
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
-#include "cache.h"
6
+#include "builtin.h"
7
#include "abspath.h"
8
#include "config.h"
9
#include "environment.h"
10
#include "gettext.h"
11
-#include "builtin.h"
11
#include "object-file.h"
12
#include "parse-options.h"
13
#include "path.h"
builtin/interpret-trailers.c
-1
@@ -5,7 +5,6 @@
5
*
6
*/
7
8
-#include "cache.h"
8
#include "builtin.h"
9
#include "gettext.h"
10
#include "parse-options.h"
builtin/ls-files.c
+1
-2
@@ -5,13 +5,12 @@
5
*
6
* Copyright (C) Linus Torvalds, 2005
7
*/
8
-#include "cache.h"
8
+#include "builtin.h"
9
#include "repository.h"
10
#include "config.h"
11
#include "convert.h"
12
#include "quote.h"
13
#include "dir.h"
14
-#include "builtin.h"
14
#include "gettext.h"
15
#include "object-name.h"
16
#include "strbuf.h"
builtin/ls-remote.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "gettext.h"
3
#include "hex.h"
4
#include "transport.h"
builtin/ls-tree.c
+1
-2
@@ -3,7 +3,7 @@
3
*
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
-#include "cache.h"
6
+#include "builtin.h"
7
#include "config.h"
8
#include "gettext.h"
9
#include "hex.h"
@@ -13,7 +13,6 @@
13
#include "tree.h"
14
#include "commit.h"
15
#include "quote.h"
16
-#include "builtin.h"
16
#include "parse-options.h"
17
#include "pathspec.h"
18
builtin/mailinfo.c
+1
-2
@@ -2,9 +2,8 @@
2
* Another stupid program, this one parsing the headers of an
3
* email to figure out authorship and subject
4
*/
5
-#include "cache.h"
6
-#include "abspath.h"
5
#include "builtin.h"
6
+#include "abspath.h"
7
#include "environment.h"
8
#include "gettext.h"
9
#include "utf8.h"
builtin/mailsplit.c
-1
@@ -4,7 +4,6 @@
4
* It just splits a mbox into a list of files: "0001" "0002" ..
5
* so you can process them further from there.
6
*/
7
-#include "cache.h"
7
#include "builtin.h"
8
#include "gettext.h"
9
#include "string-list.h"
builtin/merge-base.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "commit.h"
4
#include "gettext.h"
builtin/merge-file.c
-1
@@ -1,6 +1,5 @@
1
#include "builtin.h"
2
#include "abspath.h"
3
-#include "cache.h"
3
#include "config.h"
4
#include "gettext.h"
5
#include "setup.h"
builtin/merge-recursive.c
-1
@@ -1,4 +1,3 @@
1
-#include "cache.h"
1
#include "builtin.h"
2
#include "advice.h"
3
#include "commit.h"
builtin/merge.c
+1
-2
@@ -7,7 +7,7 @@
7
*/
8
9
#define USE_THE_INDEX_VARIABLE
10
-#include "cache.h"
10
+#include "builtin.h"
11
#include "abspath.h"
12
#include "advice.h"
13
#include "alloc.h"
@@ -18,7 +18,6 @@
18
#include "hex.h"
19
#include "object-name.h"
20
#include "parse-options.h"
21
-#include "builtin.h"
21
#include "lockfile.h"
22
#include "run-command.h"
23
#include "hook.h"
builtin/multi-pack-index.c
-1
@@ -1,6 +1,5 @@
1
#include "builtin.h"
2
#include "abspath.h"
3
-#include "cache.h"
3
#include "config.h"
4
#include "environment.h"
5
#include "gettext.h"
builtin/notes.c
+1
-2
@@ -7,9 +7,8 @@
7
* and builtin/tag.c by Kristian Høgsberg and Carlos Rica.
8
*/
9
10
-#include "cache.h"
11
-#include "config.h"
10
#include "builtin.h"
11
+#include "config.h"
12
#include "editor.h"
13
#include "gettext.h"
14
#include "hex.h"
builtin/patch-id.c
-1
@@ -1,4 +1,3 @@
1
-#include "cache.h"
1
#include "builtin.h"
2
#include "config.h"
3
#include "diff.h"
builtin/prune.c
+1
-2
@@ -1,11 +1,10 @@
1
-#include "cache.h"
1
+#include "builtin.h"
2
#include "commit.h"
3
#include "diff.h"
4
#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "revision.h"
8
-#include "builtin.h"
8
#include "reachable.h"
9
#include "parse-options.h"
10
#include "progress.h"
builtin/pull.c
+1
-2
@@ -6,10 +6,9 @@
6
* Fetch one or more remote refs and merge it/them into the current HEAD.
7
*/
8
#define USE_THE_INDEX_VARIABLE
9
-#include "cache.h"
9
+#include "builtin.h"
10
#include "advice.h"
11
#include "config.h"
12
-#include "builtin.h"
12
#include "gettext.h"
13
#include "hex.h"
14
#include "merge.h"
builtin/push.c
+1
-2
@@ -1,7 +1,7 @@
1
/*
2
* "git push"
3
*/
4
-#include "cache.h"
4
+#include "builtin.h"
5
#include "advice.h"
6
#include "branch.h"
7
#include "config.h"
@@ -10,7 +10,6 @@
10
#include "refs.h"
11
#include "refspec.h"
12
#include "run-command.h"
13
-#include "builtin.h"
13
#include "remote.h"
14
#include "transport.h"
15
#include "parse-options.h"
builtin/range-diff.c
-1
@@ -1,4 +1,3 @@
1
-#include "cache.h"
1
#include "builtin.h"
2
#include "gettext.h"
3
#include "object-name.h"
builtin/read-tree.c
+1
-2
@@ -5,7 +5,7 @@
5
*/
6
7
#define USE_THE_INDEX_VARIABLE
8
-#include "cache.h"
8
+#include "builtin.h"
9
#include "config.h"
10
#include "gettext.h"
11
#include "hex.h"
@@ -17,7 +17,6 @@
17
#include "cache-tree.h"
18
#include "unpack-trees.h"
19
#include "dir.h"
20
-#include "builtin.h"
20
#include "parse-options.h"
21
#include "repository.h"
22
#include "resolve-undo.h"
builtin/replace.c
+1
-2
@@ -8,9 +8,8 @@
8
* git-tag.sh and mktag.c by Linus Torvalds.
9
*/
10
11
-#include "cache.h"
12
-#include "config.h"
11
#include "builtin.h"
12
+#include "config.h"
13
#include "editor.h"
14
#include "environment.h"
15
#include "gettext.h"
builtin/rerere.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "dir.h"
4
#include "gettext.h"
builtin/rev-list.c
+1
-2
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "builtin.h"
2
#include "config.h"
3
#include "commit.h"
4
#include "diff.h"
@@ -15,7 +15,6 @@
15
#include "object-store.h"
16
#include "pack.h"
17
#include "pack-bitmap.h"
18
-#include "builtin.h"
18
#include "log-tree.h"
19
#include "graph.h"
20
#include "bisect.h"
builtin/rev-parse.c
+1
-2
@@ -4,7 +4,7 @@
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "abspath.h"
9
#include "alloc.h"
10
#include "config.h"
@@ -14,7 +14,6 @@
14
#include "hex.h"
15
#include "refs.h"
16
#include "quote.h"
17
-#include "builtin.h"
17
#include "object-name.h"
18
#include "parse-options.h"
19
#include "diff.h"
builtin/shortlog.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "commit.h"
4
#include "diff.h"
builtin/show-branch.c
+1
-2
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "builtin.h"
2
#include "config.h"
3
#include "environment.h"
4
#include "gettext.h"
@@ -6,7 +6,6 @@
6
#include "hex.h"
7
#include "pretty.h"
8
#include "refs.h"
9
-#include "builtin.h"
9
#include "color.h"
10
#include "strvec.h"
11
#include "object-name.h"
builtin/show-index.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "gettext.h"
3
#include "hash.h"
4
#include "hex.h"
builtin/show-ref.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "hex.h"
builtin/sparse-checkout.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "dir.h"
4
#include "environment.h"
builtin/stripspace.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "parse-options.h"
builtin/submodule--helper.c
-1
@@ -6,7 +6,6 @@
6
#include "gettext.h"
7
#include "hex.h"
8
#include "repository.h"
9
-#include "cache.h"
9
#include "config.h"
10
#include "parse-options.h"
11
#include "quote.h"
builtin/symbolic-ref.c
-1
@@ -1,6 +1,5 @@
1
#include "builtin.h"
2
#include "config.h"
3
-#include "cache.h"
3
#include "gettext.h"
4
#include "refs.h"
5
#include "parse-options.h"
builtin/tag.c
+1
-2
@@ -6,10 +6,9 @@
6
* Based on git-tag.sh and mktag.c by Linus Torvalds.
7
*/
8
9
-#include "cache.h"
9
+#include "builtin.h"
10
#include "advice.h"
11
#include "config.h"
12
-#include "builtin.h"
12
#include "editor.h"
13
#include "environment.h"
14
#include "gettext.h"
builtin/unpack-objects.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "bulk-checkin.h"
3
#include "config.h"
4
#include "environment.h"
builtin/update-index.c
+1
-2
@@ -4,7 +4,7 @@
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
-#include "cache.h"
7
+#include "builtin.h"
8
#include "bulk-checkin.h"
9
#include "config.h"
10
#include "environment.h"
@@ -15,7 +15,6 @@
15
#include "quote.h"
16
#include "cache-tree.h"
17
#include "tree-walk.h"
18
-#include "builtin.h"
18
#include "object-file.h"
19
#include "refs.h"
20
#include "resolve-undo.h"
builtin/update-ref.c
+1
-2
@@ -1,9 +1,8 @@
1
-#include "cache.h"
1
+#include "builtin.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "hash.h"
5
#include "refs.h"
6
-#include "builtin.h"
6
#include "object-name.h"
7
#include "parse-options.h"
8
#include "quote.h"
builtin/update-server-info.c
+1
-2
@@ -1,6 +1,5 @@
1
-#include "cache.h"
2
-#include "config.h"
1
#include "builtin.h"
2
+#include "config.h"
3
#include "gettext.h"
4
#include "parse-options.h"
5
#include "server-info.h"
builtin/upload-archive.c
-1
@@ -1,7 +1,6 @@
1
/*
2
* Copyright (c) 2006 Franck Bui-Huu
3
*/
4
-#include "cache.h"
4
#include "builtin.h"
5
#include "archive.h"
6
#include "pkt-line.h"
builtin/upload-pack.c
-1
@@ -1,4 +1,3 @@
1
-#include "cache.h"
1
#include "builtin.h"
2
#include "exec-cmd.h"
3
#include "gettext.h"
builtin/verify-commit.c
+1
-2
@@ -5,9 +5,8 @@
5
*
6
* Based on git-verify-tag
7
*/
8
-#include "cache.h"
9
-#include "config.h"
8
#include "builtin.h"
9
+#include "config.h"
10
#include "gettext.h"
11
#include "object-name.h"
12
#include "object-store.h"
builtin/verify-pack.c
-1
@@ -1,5 +1,4 @@
1
#include "builtin.h"
2
-#include "cache.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "run-command.h"
builtin/verify-tag.c
+1
-2
@@ -5,9 +5,8 @@
5
*
6
* Based on git-verify-tag.sh
7
*/
8
-#include "cache.h"
9
-#include "config.h"
8
#include "builtin.h"
9
+#include "config.h"
10
#include "gettext.h"
11
#include "tag.h"
12
#include "run-command.h"
builtin/worktree.c
+1
-2
@@ -1,9 +1,8 @@
1
-#include "cache.h"
1
+#include "builtin.h"
2
#include "abspath.h"
3
#include "checkout.h"
4
#include "config.h"
5
#include "copy.h"
6
-#include "builtin.h"
6
#include "dir.h"
7
#include "environment.h"
8
#include "gettext.h"
builtin/write-tree.c
-1
@@ -5,7 +5,6 @@
5
*/
6
#define USE_THE_INDEX_VARIABLE
7
#include "builtin.h"
8
-#include "cache.h"
8
#include "config.h"
9
#include "environment.h"
10
#include "gettext.h"
cache-tree.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "environment.h"
4
#include "hex.h"
cache.h
deleted
-6
@@ -1,6 +0,0 @@
1
-#ifndef CACHE_H
2
-#define CACHE_H
3
-
4
-#include "git-compat-util.h"
5
-
6
-#endif /* CACHE_H */
compat/fsmonitor/fsm-health-win32.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "config.h"
3
#include "fsmonitor.h"
4
#include "fsm-health.h"
compat/fsmonitor/fsm-listen-win32.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "config.h"
3
#include "fsmonitor.h"
4
#include "fsm-listen.h"
compat/fsmonitor/fsm-path-utils-darwin.c
+1
@@ -1,3 +1,4 @@
1
+#include "git-compat-util.h"
2
#include "fsmonitor.h"
3
#include "fsmonitor-path-utils.h"
4
#include "gettext.h"
compat/fsmonitor/fsm-path-utils-win32.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "fsmonitor.h"
3
#include "fsmonitor-path-utils.h"
4
#include "gettext.h"
compat/fsmonitor/fsm-settings-win32.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "config.h"
3
#include "repository.h"
4
#include "fsmonitor.h"
compat/mingw.c
-1
@@ -6,7 +6,6 @@
6
#include <wchar.h>
7
#include "../strbuf.h"
8
#include "../run-command.h"
9
-#include "../cache.h"
9
#include "../abspath.h"
10
#include "../alloc.h"
11
#include "win32/lazyload.h"
compat/precompose_utf8.c
+1
-1
@@ -5,7 +5,7 @@
5
6
#define PRECOMPOSE_UNICODE_C
7
8
-#include "cache.h"
8
+#include "git-compat-util.h"
9
#include "config.h"
10
#include "environment.h"
11
#include "gettext.h"
compat/sha1-chunked.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "hash-ll.h"
3
4
int git_SHA1_Update_Chunked(platform_SHA_CTX *c, const void *data, size_t len)
compat/simple-ipc/ipc-win32.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "abspath.h"
3
#include "gettext.h"
4
#include "simple-ipc.h"
compat/win32/trace2_win32_process_info.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "../../cache.h"
1
+#include "../../git-compat-util.h"
2
#include "../../json-writer.h"
3
#include "../../repository.h"
4
#include "../../trace2.h"
contrib/buildsystems/CMakeLists.txt
+1
-1
@@ -227,7 +227,7 @@ add_compile_definitions(GIT_HOST_CPU="${CMAKE_SYSTEM_PROCESSOR}")
227
add_compile_definitions(SHA256_BLK INTERNAL_QSORT RUNTIME_PREFIX)
228
add_compile_definitions(NO_OPENSSL SHA1_DC SHA1DC_NO_STANDARD_INCLUDES
229
SHA1DC_INIT_SAFE_HASH_DEFAULT=0
230
- SHA1DC_CUSTOM_INCLUDE_SHA1_C="cache.h"
230
+ SHA1DC_CUSTOM_INCLUDE_SHA1_C="git-compat-util.h"
231
SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="git-compat-util.h" )
232
list(APPEND compat_SOURCES sha1dc_git.c sha1dc/sha1.c sha1dc/ubc_check.c block-sha1/sha1.c sha256/block/sha256.c compat/qsort_s.c)
233
convert.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "advice.h"
3
#include "config.h"
4
#include "convert.h"
diff-lib.c
+1
-1
@@ -1,7 +1,7 @@
1
/*
2
* Copyright (C) 2005 Junio C Hamano
3
*/
4
-#include "cache.h"
4
+#include "git-compat-util.h"
5
#include "quote.h"
6
#include "commit.h"
7
#include "diff.h"
diff.c
+1
-1
@@ -1,7 +1,7 @@
1
/*
2
* Copyright (C) 2005 Junio C Hamano
3
*/
4
-#include "cache.h"
4
+#include "git-compat-util.h"
5
#include "abspath.h"
6
#include "alloc.h"
7
#include "base85.h"
entry.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "blob.h"
3
#include "object-store.h"
4
#include "dir.h"
environment.c
+1
-1
@@ -109,7 +109,7 @@ char *git_work_tree_cfg;
109
static char *git_namespace;
110
111
/*
112
- * Repository-local GIT_* environment variables; see cache.h for details.
112
+ * Repository-local GIT_* environment variables; see environment.h for details.
113
*/
114
const char * const local_repo_env[] = {
115
ALTERNATE_DB_ENVIRONMENT,
fsmonitor-ipc.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "fsmonitor.h"
3
#include "gettext.h"
4
#include "simple-ipc.h"
fsmonitor.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "config.h"
3
#include "dir.h"
4
#include "environment.h"
fsmonitor.h
-1
@@ -1,7 +1,6 @@
1
#ifndef FSMONITOR_H
2
#define FSMONITOR_H
3
4
-#include "cache.h"
4
#include "dir.h"
5
#include "fsmonitor-settings.h"
6
#include "object.h"
hash-lookup.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "hash.h"
3
#include "hash-lookup.h"
4
#include "read-cache-ll.h"
merge-ort-wrappers.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "gettext.h"
3
#include "hash.h"
4
#include "merge-ort.h"
merge-ort.c
+1
-1
@@ -14,7 +14,7 @@
14
* "cale", "peedy", or "ins" instead of "ort"?)
15
*/
16
17
-#include "cache.h"
17
+#include "git-compat-util.h"
18
#include "merge-ort.h"
19
20
#include "alloc.h"
merge-recursive.c
+1
-1
@@ -3,7 +3,7 @@
3
* Fredrik Kuivinen.
4
* The thieves were Alex Riesen and Johannes Schindelin, in June/July 2006
5
*/
6
-#include "cache.h"
6
+#include "git-compat-util.h"
7
#include "merge-recursive.h"
8
9
#include "advice.h"
merge.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "diff.h"
3
#include "diffcore.h"
4
#include "gettext.h"
name-hash.c
+1
-1
@@ -5,7 +5,7 @@
5
*
6
* Copyright (C) 2008 Linus Torvalds
7
*/
8
-#include "cache.h"
8
+#include "git-compat-util.h"
9
#include "environment.h"
10
#include "gettext.h"
11
#include "name-hash.h"
object-name.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "object-name.h"
3
#include "advice.h"
4
#include "config.h"
object.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "gettext.h"
3
#include "hex.h"
4
#include "object.h"
parallel-checkout.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "config.h"
4
#include "entry.h"
pathspec.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "abspath.h"
3
#include "config.h"
4
#include "dir.h"
preload-index.c
+1
-1
@@ -1,7 +1,7 @@
1
/*
2
* Copyright (C) 2008 Linus Torvalds
3
*/
4
-#include "cache.h"
4
+#include "git-compat-util.h"
5
#include "pathspec.h"
6
#include "dir.h"
7
#include "environment.h"
read-cache.c
+1
-1
@@ -3,7 +3,7 @@
3
*
4
* Copyright (C) Linus Torvalds, 2005
5
*/
6
-#include "cache.h"
6
+#include "git-compat-util.h"
7
#include "alloc.h"
8
#include "bulk-checkin.h"
9
#include "config.h"
refs/files-backend.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "../cache.h"
1
+#include "../git-compat-util.h"
2
#include "../config.h"
3
#include "../copy.h"
4
#include "../environment.h"
refs/packed-backend.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "../cache.h"
1
+#include "../git-compat-util.h"
2
#include "../alloc.h"
3
#include "../config.h"
4
#include "../gettext.h"
repository.c
+1
-1
@@ -3,7 +3,7 @@
3
* declaration matches the definition in this file.
4
*/
5
#define USE_THE_INDEX_VARIABLE
6
-#include "cache.h"
6
+#include "git-compat-util.h"
7
#include "abspath.h"
8
#include "repository.h"
9
#include "object-store.h"
rerere.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "config.h"
resolve-undo.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "dir.h"
3
#include "hash.h"
4
#include "read-cache.h"
revision.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "config.h"
4
#include "environment.h"
run-command.h
+1
-1
@@ -503,7 +503,7 @@ void run_processes_parallel(const struct run_process_parallel_opts *opts);
503
* exception of GIT_CONFIG_PARAMETERS and GIT_CONFIG_COUNT (which cause the
504
* corresponding environment variables to be unset in the subprocess) and adds
505
* an environment variable pointing to new_git_dir. See local_repo_env in
506
- * cache.h for more information.
506
+ * environment.h for more information.
507
*/
508
void prepare_other_repo_env(struct strvec *env, const char *new_git_dir);
509
sequencer.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "abspath.h"
3
#include "advice.h"
4
#include "alloc.h"
shallow.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "hex.h"
4
#include "repository.h"
sparse-index.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "environment.h"
4
#include "gettext.h"
split-index.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "gettext.h"
4
#include "hash.h"
strbuf.h
-4
@@ -72,10 +72,6 @@ struct strbuf {
72
extern char strbuf_slopbuf[];
73
#define STRBUF_INIT { .buf = strbuf_slopbuf }
74
75
-/*
76
- * Predeclare this here, since cache.h includes this file before it defines the
77
- * struct.
78
- */
75
struct object_id;
76
77
/**
submodule.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "repository.h"
t/helper/test-cache-tree.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "gettext.h"
4
#include "hex.h"
5
#include "tree.h"
t/helper/test-dump-cache-tree.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "hash.h"
4
#include "hex.h"
5
#include "tree.h"
t/helper/test-dump-fsmonitor.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "read-cache-ll.h"
3
#include "repository.h"
4
#include "setup.h"
t/helper/test-dump-split-index.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "hex.h"
4
#include "read-cache-ll.h"
5
#include "repository.h"
t/helper/test-dump-untracked-cache.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "dir.h"
4
#include "hex.h"
5
#include "read-cache-ll.h"
t/helper/test-fast-rebase.c
-1
@@ -12,7 +12,6 @@
12
13
#define USE_THE_INDEX_VARIABLE
14
#include "test-tool.h"
15
-#include "cache.h"
15
#include "cache-tree.h"
16
#include "commit.h"
17
#include "environment.h"
t/helper/test-fsmonitor-client.c
-1
@@ -4,7 +4,6 @@
4
*/
5
6
#include "test-tool.h"
7
-#include "cache.h"
7
#include "parse-options.h"
8
#include "fsmonitor-ipc.h"
9
#include "read-cache-ll.h"
t/helper/test-hash-speed.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "hash-ll.h"
3
4
#define NUM_SECONDS 3
t/helper/test-index-version.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "read-cache-ll.h"
3
4
int cmd__index_version(int argc UNUSED, const char **argv UNUSED)
t/helper/test-lazy-init-name-hash.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "environment.h"
4
#include "name-hash.h"
5
#include "parse-options.h"
t/helper/test-path-utils.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "abspath.h"
3
#include "environment.h"
4
#include "path.h"
t/helper/test-read-cache.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "config.h"
4
#include "read-cache-ll.h"
5
#include "repository.h"
t/helper/test-scrap-cache-tree.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "lockfile.h"
4
#include "read-cache-ll.h"
5
#include "repository.h"
t/helper/test-sha1.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "hash-ll.h"
3
4
int cmd__sha1(int ac, const char **av)
t/helper/test-sha256.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "hash-ll.h"
3
4
int cmd__sha256(int ac, const char **av)
t/helper/test-strcmp-offset.c
-1
@@ -1,5 +1,4 @@
1
#include "test-tool.h"
2
-#include "cache.h"
2
#include "read-cache-ll.h"
3
4
int cmd__strcmp_offset(int argc UNUSED, const char **argv)
t/helper/test-write-cache.c
-1
@@ -1,6 +1,5 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
-#include "cache.h"
3
#include "lockfile.h"
4
#include "read-cache-ll.h"
5
#include "repository.h"
unpack-trees.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "advice.h"
3
#include "strvec.h"
4
#include "repository.h"
wt-status.c
+1
-1
@@ -1,4 +1,4 @@
1
-#include "cache.h"
1
+#include "git-compat-util.h"
2
#include "advice.h"
3
#include "wt-status.h"
4
#include "object.h"