object-store: merge "object-store-ll.h" and "object-store.h"

The "object-store-ll.h" header has been introduced to keep transitive header dependendcies and compile times at bay. Now that we have created a new "object-store.c" file though we can easily move the last remaining additional bit of "object-store.h", the `odb_path_map`, out of the header. Do so. As the "object-store.h" header is now equivalent to its low-level alternative we drop the latter and inline it into the former. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Apr 15, 2025 at 11:38 UTC 68cd492a3e662c75dec364986c81e94716d4ac56
124 files changed +637 -642
apply.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "abspath.h"
15 #include "base85.h"
16 #include "config.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "delta.h"
19 #include "diff.h"
20 #include "dir.h"
archive-tar.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "hex.h"
12 #include "tar.h"
13 #include "archive.h"
14 -#include "object-store-ll.h"
14 +#include "object-store.h"
15 #include "strbuf.h"
16 #include "streaming.h"
17 #include "run-command.h"
archive-zip.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "hex.h"
13 #include "streaming.h"
14 #include "utf8.h"
15 -#include "object-store-ll.h"
15 +#include "object-store.h"
16 #include "strbuf.h"
17 #include "userdiff.h"
18 #include "write-or-die.h"
archive.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "pretty.h"
15 #include "setup.h"
16 #include "refs.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "commit.h"
19 #include "tree.h"
20 #include "tree-walk.h"
attr.c
+1 -1
@@ -22,7 +22,7 @@
22 #include "read-cache-ll.h"
23 #include "refs.h"
24 #include "revision.h"
25 -#include "object-store-ll.h"
25 +#include "object-store.h"
26 #include "setup.h"
27 #include "thread-utils.h"
28 #include "tree-walk.h"
bisect.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "commit-slab.h"
21 #include "commit-reach.h"
22 #include "object-name.h"
23 -#include "object-store-ll.h"
23 +#include "object-store.h"
24 #include "path.h"
25 #include "dir.h"
26
blame.c
+1 -1
@@ -3,7 +3,7 @@
3
4 #include "git-compat-util.h"
5 #include "refs.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7 #include "cache-tree.h"
8 #include "mergesort.h"
9 #include "commit.h"
builtin/backfill.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "tree.h"
14 #include "tree-walk.h"
15 #include "object.h"
16 -#include "object-store-ll.h"
16 +#include "object-store.h"
17 #include "oid-array.h"
18 #include "oidset.h"
19 #include "promisor-remote.h"
builtin/blame.c
+1 -1
@@ -28,7 +28,7 @@
28 #include "line-log.h"
29 #include "progress.h"
30 #include "object-name.h"
31 -#include "object-store-ll.h"
31 +#include "object-store.h"
32 #include "pager.h"
33 #include "blame.h"
34 #include "refs.h"
builtin/cat-file.c
+1 -1
@@ -22,7 +22,7 @@
22 #include "packfile.h"
23 #include "object-file.h"
24 #include "object-name.h"
25 -#include "object-store-ll.h"
25 +#include "object-store.h"
26 #include "replace-object.h"
27 #include "promisor-remote.h"
28 #include "mailmap.h"
builtin/checkout.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "merge-recursive.h"
21 #include "object-file.h"
22 #include "object-name.h"
23 -#include "object-store-ll.h"
23 +#include "object-store.h"
24 #include "parse-options.h"
25 #include "path.h"
26 #include "preload-index.h"
builtin/clone.c
+1 -1
@@ -25,7 +25,7 @@
25 #include "refs.h"
26 #include "refspec.h"
27 #include "object-file.h"
28 -#include "object-store-ll.h"
28 +#include "object-store.h"
29 #include "tree.h"
30 #include "tree-walk.h"
31 #include "unpack-trees.h"
builtin/commit-graph.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "hex.h"
7 #include "parse-options.h"
8 #include "commit-graph.h"
9 -#include "object-store-ll.h"
9 +#include "object-store.h"
10 #include "progress.h"
11 #include "replace-object.h"
12 #include "strbuf.h"
builtin/commit-tree.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "gettext.h"
10 #include "hex.h"
11 #include "object-name.h"
12 -#include "object-store-ll.h"
12 +#include "object-store.h"
13
14 #include "commit.h"
15 #include "parse-options.h"
builtin/count-objects.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "parse-options.h"
13 #include "quote.h"
14 #include "packfile.h"
15 -#include "object-store-ll.h"
15 +#include "object-store.h"
16
17 static unsigned long garbage;
18 static off_t size_garbage;
builtin/describe.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "setup.h"
20 #include "strvec.h"
21 #include "run-command.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "list-objects.h"
24 #include "commit-slab.h"
25 #include "wildmatch.h"
builtin/difftool.c
+1 -1
@@ -30,7 +30,7 @@
30 #include "strbuf.h"
31 #include "lockfile.h"
32 #include "object-file.h"
33 -#include "object-store-ll.h"
33 +#include "object-store.h"
34 #include "dir.h"
35 #include "entry.h"
36 #include "setup.h"
builtin/fast-export.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "refs.h"
15 #include "refspec.h"
16 #include "object-file.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "commit.h"
19 #include "object.h"
20 #include "tag.h"
builtin/fast-import.c
+1 -1
@@ -24,7 +24,7 @@
24 #include "packfile.h"
25 #include "object-file.h"
26 #include "object-name.h"
27 -#include "object-store-ll.h"
27 +#include "object-store.h"
28 #include "mem-pool.h"
29 #include "commit-reach.h"
30 #include "khash.h"
builtin/fetch.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "refs.h"
15 #include "refspec.h"
16 #include "object-name.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "oidset.h"
19 #include "oid-array.h"
20 #include "commit.h"
builtin/fsck.c
+1 -1
@@ -17,7 +17,7 @@
17 #include "packfile.h"
18 #include "object-file.h"
19 #include "object-name.h"
20 -#include "object-store-ll.h"
20 +#include "object-store.h"
21 #include "path.h"
22 #include "read-cache-ll.h"
23 #include "replace-object.h"
builtin/gc.c
+1 -1
@@ -28,7 +28,7 @@
28 #include "commit.h"
29 #include "commit-graph.h"
30 #include "packfile.h"
31 -#include "object-store-ll.h"
31 +#include "object-store.h"
32 #include "pack.h"
33 #include "pack-objects.h"
34 #include "path.h"
builtin/grep.c
+1 -1
@@ -26,7 +26,7 @@
26 #include "submodule-config.h"
27 #include "object-file.h"
28 #include "object-name.h"
29 -#include "object-store-ll.h"
29 +#include "object-store.h"
30 #include "packfile.h"
31 #include "pager.h"
32 #include "path.h"
builtin/hash-object.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "gettext.h"
12 #include "hex.h"
13 #include "object-file.h"
14 -#include "object-store-ll.h"
14 +#include "object-store.h"
15 #include "blob.h"
16 #include "quote.h"
17 #include "parse-options.h"
builtin/index-pack.c
+1 -1
@@ -21,7 +21,7 @@
21 #include "packfile.h"
22 #include "pack-revindex.h"
23 #include "object-file.h"
24 -#include "object-store-ll.h"
24 +#include "object-store.h"
25 #include "oid-array.h"
26 #include "oidset.h"
27 #include "path.h"
builtin/log.c
+1 -1
@@ -15,7 +15,7 @@
15 #include "hex.h"
16 #include "refs.h"
17 #include "object-name.h"
18 -#include "object-store-ll.h"
18 +#include "object-store.h"
19 #include "pager.h"
20 #include "color.h"
21 #include "commit.h"
builtin/ls-tree.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "gettext.h"
11 #include "hex.h"
12 #include "object-name.h"
13 -#include "object-store-ll.h"
13 +#include "object-store.h"
14 #include "tree.h"
15 #include "path.h"
16 #include "quote.h"
builtin/merge-tree.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "commit-reach.h"
11 #include "merge-ort.h"
12 #include "object-name.h"
13 -#include "object-store-ll.h"
13 +#include "object-store.h"
14 #include "parse-options.h"
15 #include "blob.h"
16 #include "merge-blobs.h"
builtin/mktag.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "strbuf.h"
7 #include "replace-object.h"
8 #include "object-file.h"
9 -#include "object-store-ll.h"
9 +#include "object-store.h"
10 #include "fsck.h"
11 #include "config.h"
12
builtin/mktree.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "tree.h"
13 #include "parse-options.h"
14 #include "object-file.h"
15 -#include "object-store-ll.h"
15 +#include "object-store.h"
16
17 static struct treeent {
18 unsigned mode;
builtin/multi-pack-index.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "midx.h"
8 #include "strbuf.h"
9 #include "trace2.h"
10 -#include "object-store-ll.h"
10 +#include "object-store.h"
11 #include "replace-object.h"
12 #include "repository.h"
13
builtin/notes.c
+1 -1
@@ -16,7 +16,7 @@
16 #include "notes.h"
17 #include "object-file.h"
18 #include "object-name.h"
19 -#include "object-store-ll.h"
19 +#include "object-store.h"
20 #include "path.h"
21
22 #include "pretty.h"
builtin/pack-objects.c
+1 -1
@@ -32,7 +32,7 @@
32 #include "list.h"
33 #include "packfile.h"
34 #include "object-file.h"
35 -#include "object-store-ll.h"
35 +#include "object-store.h"
36 #include "replace-object.h"
37 #include "dir.h"
38 #include "midx.h"
builtin/pack-redundant.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "hex.h"
14
15 #include "packfile.h"
16 -#include "object-store-ll.h"
16 +#include "object-store.h"
17 #include "strbuf.h"
18
19 #define BLKSIZE 512
builtin/prune.c
+1 -1
@@ -17,7 +17,7 @@
17 #include "replace-object.h"
18 #include "object-file.h"
19 #include "object-name.h"
20 -#include "object-store-ll.h"
20 +#include "object-store.h"
21 #include "shallow.h"
22
23 static const char * const prune_usage[] = {
builtin/receive-pack.c
+1 -1
@@ -33,7 +33,7 @@
33 #include "packfile.h"
34 #include "object-file.h"
35 #include "object-name.h"
36 -#include "object-store-ll.h"
36 +#include "object-store.h"
37 #include "path.h"
38 #include "protocol.h"
39 #include "commit-reach.h"
builtin/remote.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "rebase.h"
15 #include "refs.h"
16 #include "refspec.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "strvec.h"
19 #include "commit-reach.h"
20 #include "progress.h"
builtin/repack.c
+1 -1
@@ -17,7 +17,7 @@
17 #include "midx.h"
18 #include "packfile.h"
19 #include "prune-packed.h"
20 -#include "object-store-ll.h"
20 +#include "object-store.h"
21 #include "promisor-remote.h"
22 #include "shallow.h"
23 #include "pack.h"
builtin/replace.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "run-command.h"
20 #include "object-file.h"
21 #include "object-name.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "replace-object.h"
24 #include "tag.h"
25 #include "wildmatch.h"
builtin/rev-list.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "object.h"
15 #include "object-name.h"
16 #include "object-file.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "pack-bitmap.h"
19 #include "log-tree.h"
20 #include "graph.h"
builtin/show-ref.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "hex.h"
6 #include "refs/refs-internal.h"
7 #include "object-name.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "object.h"
10 #include "string-list.h"
11 #include "parse-options.h"
builtin/submodule--helper.c
+1 -1
@@ -28,7 +28,7 @@
28 #include "diff.h"
29 #include "object-file.h"
30 #include "object-name.h"
31 -#include "object-store-ll.h"
31 +#include "object-store.h"
32 #include "advice.h"
33 #include "branch.h"
34 #include "list-objects-filter-options.h"
builtin/tag.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "refs.h"
20 #include "object-file.h"
21 #include "object-name.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "path.h"
24 #include "tag.h"
25 #include "parse-options.h"
builtin/unpack-file.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "hex.h"
5 #include "object-file.h"
6 #include "object-name.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8
9 static char *create_temp_file(struct object_id *oid)
10 {
builtin/unpack-objects.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "git-zlib.h"
10 #include "hex.h"
11 #include "object-file.h"
12 -#include "object-store-ll.h"
12 +#include "object-store.h"
13 #include "object.h"
14 #include "delta.h"
15 #include "pack.h"
bulk-checkin.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "tmp-objdir.h"
19 #include "packfile.h"
20 #include "object-file.h"
21 -#include "object-store-ll.h"
21 +#include "object-store.h"
22
23 static int odb_transaction_nesting;
24
bundle-uri.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "fetch-pack.h"
15 #include "remote.h"
16 #include "trace2.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18
19 static struct {
20 enum bundle_list_heuristic heuristic;
bundle.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "environment.h"
8 #include "gettext.h"
9 #include "hex.h"
10 -#include "object-store-ll.h"
10 +#include "object-store.h"
11 #include "repository.h"
12 #include "object.h"
13 #include "commit.h"
cache-tree.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "cache-tree.h"
11 #include "bulk-checkin.h"
12 #include "object-file.h"
13 -#include "object-store-ll.h"
13 +#include "object-store.h"
14 #include "read-cache-ll.h"
15 #include "replace-object.h"
16 #include "repository.h"
combine-diff.c
+1 -1
@@ -2,7 +2,7 @@
2 #define DISABLE_SIGN_COMPARE_WARNINGS
3
4 #include "git-compat-util.h"
5 -#include "object-store-ll.h"
5 +#include "object-store.h"
6 #include "commit.h"
7 #include "convert.h"
8 #include "diff.h"
commit-graph.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "refs.h"
14 #include "hash-lookup.h"
15 #include "commit-graph.h"
16 -#include "object-store-ll.h"
16 +#include "object-store.h"
17 #include "oid-array.h"
18 #include "path.h"
19 #include "alloc.h"
commit-graph.h
+1 -1
@@ -1,7 +1,7 @@
1 #ifndef COMMIT_GRAPH_H
2 #define COMMIT_GRAPH_H
3
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "oidset.h"
6
7 #define GIT_TEST_COMMIT_GRAPH "GIT_TEST_COMMIT_GRAPH"
commit.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "hex.h"
10 #include "repository.h"
11 #include "object-name.h"
12 -#include "object-store-ll.h"
12 +#include "object-store.h"
13 #include "utf8.h"
14 #include "diff.h"
15 #include "revision.h"
config.c
+1 -1
@@ -31,7 +31,7 @@
31 #include "hashmap.h"
32 #include "string-list.h"
33 #include "object-name.h"
34 -#include "object-store-ll.h"
34 +#include "object-store.h"
35 #include "pager.h"
36 #include "path.h"
37 #include "utf8.h"
connected.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "git-compat-util.h"
4 #include "gettext.h"
5 #include "hex.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7 #include "run-command.h"
8 #include "sigchain.h"
9 #include "connected.h"
convert.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "copy.h"
9 #include "gettext.h"
10 #include "hex.h"
11 -#include "object-store-ll.h"
11 +#include "object-store.h"
12 #include "attr.h"
13 #include "run-command.h"
14 #include "quote.h"
diagnose.c
+1 -1
@@ -7,7 +7,7 @@
7 #include "gettext.h"
8 #include "hex.h"
9 #include "strvec.h"
10 -#include "object-store-ll.h"
10 +#include "object-store.h"
11 #include "packfile.h"
12 #include "parse-options.h"
13 #include "repository.h"
diff.c
+1 -1
@@ -23,7 +23,7 @@
23 #include "color.h"
24 #include "run-command.h"
25 #include "utf8.h"
26 -#include "object-store-ll.h"
26 +#include "object-store.h"
27 #include "userdiff.h"
28 #include "submodule.h"
29 #include "hashmap.h"
diffcore-rename.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "git-compat-util.h"
9 #include "diff.h"
10 #include "diffcore.h"
11 -#include "object-store-ll.h"
11 +#include "object-store.h"
12 #include "hashmap.h"
13 #include "mem-pool.h"
14 #include "oid-array.h"
dir.c
+1 -1
@@ -17,7 +17,7 @@
17 #include "environment.h"
18 #include "gettext.h"
19 #include "name-hash.h"
20 -#include "object-store-ll.h"
20 +#include "object-store.h"
21 #include "path.h"
22 #include "refs.h"
23 #include "repository.h"
entry.c
+1 -1
@@ -1,7 +1,7 @@
1 #define USE_THE_REPOSITORY_VARIABLE
2
3 #include "git-compat-util.h"
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "dir.h"
6 #include "environment.h"
7 #include "gettext.h"
fetch-pack.c
+1 -1
@@ -24,7 +24,7 @@
24 #include "oid-array.h"
25 #include "oidset.h"
26 #include "packfile.h"
27 -#include "object-store-ll.h"
27 +#include "object-store.h"
28 #include "path.h"
29 #include "connected.h"
30 #include "fetch-negotiator.h"
fmt-merge-msg.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "environment.h"
7 #include "refs.h"
8 #include "object-name.h"
9 -#include "object-store-ll.h"
9 +#include "object-store.h"
10 #include "diff.h"
11 #include "diff-merges.h"
12 #include "hex.h"
fsck.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "date.h"
5 #include "dir.h"
6 #include "hex.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8 #include "path.h"
9 #include "repository.h"
10 #include "object.h"
grep.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "gettext.h"
6 #include "grep.h"
7 #include "hex.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "pretty.h"
10 #include "userdiff.h"
11 #include "xdiff-interface.h"
http-backend.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "url.h"
19 #include "strvec.h"
20 #include "packfile.h"
21 -#include "object-store-ll.h"
21 +#include "object-store.h"
22 #include "protocol.h"
23 #include "date.h"
24 #include "write-or-die.h"
http-push.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "url.h"
21 #include "packfile.h"
22 #include "object-file.h"
23 -#include "object-store-ll.h"
23 +#include "object-store.h"
24 #include "commit-reach.h"
25
26 #ifdef EXPAT_NEEDS_XMLPARSE_H
http-walker.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "list.h"
10 #include "transport.h"
11 #include "packfile.h"
12 -#include "object-store-ll.h"
12 +#include "object-store.h"
13
14 struct alt_base {
15 char *base;
http.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "packfile.h"
20 #include "string-list.h"
21 #include "object-file.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "tempfile.h"
24
25 static struct trace_key trace_curl = TRACE_KEY_INIT(CURL);
list-objects-filter.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "oidmap.h"
13 #include "oidset.h"
14 #include "object-name.h"
15 -#include "object-store-ll.h"
15 +#include "object-store.h"
16
17 /* Remember to update object flag allocation in object.h */
18 /*
list-objects.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "list-objects-filter.h"
15 #include "list-objects-filter-options.h"
16 #include "packfile.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "trace.h"
19 #include "environment.h"
20
log-tree.c
+1 -1
@@ -9,7 +9,7 @@
9 #include "environment.h"
10 #include "hex.h"
11 #include "object-name.h"
12 -#include "object-store-ll.h"
12 +#include "object-store.h"
13 #include "repository.h"
14 #include "tmp-objdir.h"
15 #include "commit.h"
mailmap.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "string-list.h"
7 #include "mailmap.h"
8 #include "object-name.h"
9 -#include "object-store-ll.h"
9 +#include "object-store.h"
10 #include "setup.h"
11
12 char *git_mailmap_file;
merge-blobs.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "merge-ll.h"
5 #include "blob.h"
6 #include "merge-blobs.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8
9 static int fill_mmfile_blob(mmfile_t *f, struct blob *obj)
10 {
merge-recursive.c
+1 -1
@@ -27,7 +27,7 @@
27 #include "name-hash.h"
28 #include "object-file.h"
29 #include "object-name.h"
30 -#include "object-store-ll.h"
30 +#include "object-store.h"
31 #include "path.h"
32 #include "repository.h"
33 #include "revision.h"
notes-merge.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "refs.h"
9 #include "object-file.h"
10 #include "object-name.h"
11 -#include "object-store-ll.h"
11 +#include "object-store.h"
12 #include "path.h"
13 #include "repository.h"
14 #include "diff.h"
object-file.c
+1
@@ -13,6 +13,7 @@
13 #include "git-compat-util.h"
14 #include "bulk-checkin.h"
15 #include "convert.h"
16 +#include "dir.h"
17 #include "environment.h"
18 #include "fsck.h"
19 #include "gettext.h"
object-name.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "oidtree.h"
20 #include "packfile.h"
21 #include "pretty.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "read-cache-ll.h"
24 #include "repo-settings.h"
25 #include "repository.h"
object-store-ll.h deleted
-517
@@ -1,517 +0,0 @@
1 -#ifndef OBJECT_STORE_LL_H
2 -#define OBJECT_STORE_LL_H
3 -
4 -#include "hashmap.h"
5 -#include "object.h"
6 -#include "list.h"
7 -#include "thread-utils.h"
8 -#include "oidset.h"
9 -
10 -struct oidmap;
11 -struct oidtree;
12 -struct strbuf;
13 -struct repository;
14 -
15 -struct object_directory {
16 - struct object_directory *next;
17 -
18 - /*
19 - * Used to store the results of readdir(3) calls when we are OK
20 - * sacrificing accuracy due to races for speed. That includes
21 - * object existence with OBJECT_INFO_QUICK, as well as
22 - * our search for unique abbreviated hashes. Don't use it for tasks
23 - * requiring greater accuracy!
24 - *
25 - * Be sure to call odb_load_loose_cache() before using.
26 - */
27 - uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
28 - struct oidtree *loose_objects_cache;
29 -
30 - /* Map between object IDs for loose objects. */
31 - struct loose_object_map *loose_map;
32 -
33 - /*
34 - * This is a temporary object store created by the tmp_objdir
35 - * facility. Disable ref updates since the objects in the store
36 - * might be discarded on rollback.
37 - */
38 - int disable_ref_updates;
39 -
40 - /*
41 - * This object store is ephemeral, so there is no need to fsync.
42 - */
43 - int will_destroy;
44 -
45 - /*
46 - * Path to the alternative object store. If this is a relative path,
47 - * it is relative to the current working directory.
48 - */
49 - char *path;
50 -};
51 -
52 -void prepare_alt_odb(struct repository *r);
53 -int has_alt_odb(struct repository *r);
54 -char *compute_alternate_path(const char *path, struct strbuf *err);
55 -struct object_directory *find_odb(struct repository *r, const char *obj_dir);
56 -typedef int alt_odb_fn(struct object_directory *, void *);
57 -int foreach_alt_odb(alt_odb_fn, void*);
58 -typedef void alternate_ref_fn(const struct object_id *oid, void *);
59 -void for_each_alternate_ref(alternate_ref_fn, void *);
60 -
61 -/*
62 - * Add the directory to the on-disk alternates file; the new entry will also
63 - * take effect in the current process.
64 - */
65 -void add_to_alternates_file(const char *dir);
66 -
67 -/*
68 - * Add the directory to the in-memory list of alternates (along with any
69 - * recursive alternates it points to), but do not modify the on-disk alternates
70 - * file.
71 - */
72 -void add_to_alternates_memory(const char *dir);
73 -
74 -/*
75 - * Replace the current writable object directory with the specified temporary
76 - * object directory; returns the former primary object directory.
77 - */
78 -struct object_directory *set_temporary_primary_odb(const char *dir, int will_destroy);
79 -
80 -/*
81 - * Restore a previous ODB replaced by set_temporary_main_odb.
82 - */
83 -void restore_primary_odb(struct object_directory *restore_odb, const char *old_path);
84 -
85 -/*
86 - * Populate and return the loose object cache array corresponding to the
87 - * given object ID.
88 - */
89 -struct oidtree *odb_loose_cache(struct object_directory *odb,
90 - const struct object_id *oid);
91 -
92 -/* Empty the loose object cache for the specified object directory. */
93 -void odb_clear_loose_cache(struct object_directory *odb);
94 -
95 -struct packed_git {
96 - struct hashmap_entry packmap_ent;
97 - struct packed_git *next;
98 - struct list_head mru;
99 - struct pack_window *windows;
100 - off_t pack_size;
101 - const void *index_data;
102 - size_t index_size;
103 - uint32_t num_objects;
104 - size_t crc_offset;
105 - struct oidset bad_objects;
106 - int index_version;
107 - time_t mtime;
108 - int pack_fd;
109 - int index; /* for builtin/pack-objects.c */
110 - unsigned pack_local:1,
111 - pack_keep:1,
112 - pack_keep_in_core:1,
113 - freshened:1,
114 - do_not_close:1,
115 - pack_promisor:1,
116 - multi_pack_index:1,
117 - is_cruft:1;
118 - unsigned char hash[GIT_MAX_RAWSZ];
119 - struct revindex_entry *revindex;
120 - const uint32_t *revindex_data;
121 - const uint32_t *revindex_map;
122 - size_t revindex_size;
123 - /*
124 - * mtimes_map points at the beginning of the memory mapped region of
125 - * this pack's corresponding .mtimes file, and mtimes_size is the size
126 - * of that .mtimes file
127 - */
128 - const uint32_t *mtimes_map;
129 - size_t mtimes_size;
130 -
131 - /* repo denotes the repository this packfile belongs to */
132 - struct repository *repo;
133 -
134 - /* something like ".git/objects/pack/xxxxx.pack" */
135 - char pack_name[FLEX_ARRAY]; /* more */
136 -};
137 -
138 -struct multi_pack_index;
139 -
140 -static inline int pack_map_entry_cmp(const void *cmp_data UNUSED,
141 - const struct hashmap_entry *entry,
142 - const struct hashmap_entry *entry2,
143 - const void *keydata)
144 -{
145 - const char *key = keydata;
146 - const struct packed_git *pg1, *pg2;
147 -
148 - pg1 = container_of(entry, const struct packed_git, packmap_ent);
149 - pg2 = container_of(entry2, const struct packed_git, packmap_ent);
150 -
151 - return strcmp(pg1->pack_name, key ? key : pg2->pack_name);
152 -}
153 -
154 -struct cached_object_entry;
155 -
156 -struct raw_object_store {
157 - /*
158 - * Set of all object directories; the main directory is first (and
159 - * cannot be NULL after initialization). Subsequent directories are
160 - * alternates.
161 - */
162 - struct object_directory *odb;
163 - struct object_directory **odb_tail;
164 - struct kh_odb_path_map *odb_by_path;
165 -
166 - int loaded_alternates;
167 -
168 - /*
169 - * A list of alternate object directories loaded from the environment;
170 - * this should not generally need to be accessed directly, but will
171 - * populate the "odb" list when prepare_alt_odb() is run.
172 - */
173 - char *alternate_db;
174 -
175 - /*
176 - * Objects that should be substituted by other objects
177 - * (see git-replace(1)).
178 - */
179 - struct oidmap *replace_map;
180 - unsigned replace_map_initialized : 1;
181 - pthread_mutex_t replace_mutex; /* protect object replace functions */
182 -
183 - struct commit_graph *commit_graph;
184 - unsigned commit_graph_attempted : 1; /* if loading has been attempted */
185 -
186 - /*
187 - * private data
188 - *
189 - * should only be accessed directly by packfile.c and midx.c
190 - */
191 - struct multi_pack_index *multi_pack_index;
192 -
193 - /*
194 - * private data
195 - *
196 - * should only be accessed directly by packfile.c
197 - */
198 -
199 - struct packed_git *packed_git;
200 - /* A most-recently-used ordered version of the packed_git list. */
201 - struct list_head packed_git_mru;
202 -
203 - struct {
204 - struct packed_git **packs;
205 - unsigned flags;
206 - } kept_pack_cache;
207 -
208 - /*
209 - * This is meant to hold a *small* number of objects that you would
210 - * want repo_read_object_file() to be able to return, but yet you do not want
211 - * to write them into the object store (e.g. a browse-only
212 - * application).
213 - */
214 - struct cached_object_entry *cached_objects;
215 - size_t cached_object_nr, cached_object_alloc;
216 -
217 - /*
218 - * A map of packfiles to packed_git structs for tracking which
219 - * packs have been loaded already.
220 - */
221 - struct hashmap pack_map;
222 -
223 - /*
224 - * A fast, rough count of the number of objects in the repository.
225 - * These two fields are not meant for direct access. Use
226 - * repo_approximate_object_count() instead.
227 - */
228 - unsigned long approximate_object_count;
229 - unsigned approximate_object_count_valid : 1;
230 -
231 - /*
232 - * Whether packed_git has already been populated with this repository's
233 - * packs.
234 - */
235 - unsigned packed_git_initialized : 1;
236 -};
237 -
238 -struct raw_object_store *raw_object_store_new(void);
239 -void raw_object_store_clear(struct raw_object_store *o);
240 -
241 -/*
242 - * Create a temporary file rooted in the object database directory, or
243 - * die on failure. The filename is taken from "pattern", which should have the
244 - * usual "XXXXXX" trailer, and the resulting filename is written into the
245 - * "template" buffer. Returns the open descriptor.
246 - */
247 -int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
248 -
249 -/*
250 - * Create a pack .keep file named "name" (which should generally be the output
251 - * of odb_pack_name). Returns a file descriptor opened for writing, or -1 on
252 - * error.
253 - */
254 -int odb_pack_keep(const char *name);
255 -
256 -/*
257 - * Put in `buf` the name of the file in the local object database that
258 - * would be used to store a loose object with the specified oid.
259 - */
260 -const char *loose_object_path(struct repository *r, struct strbuf *buf,
261 - const struct object_id *oid);
262 -
263 -void *map_loose_object(struct repository *r, const struct object_id *oid,
264 - unsigned long *size);
265 -
266 -void *repo_read_object_file(struct repository *r,
267 - const struct object_id *oid,
268 - enum object_type *type,
269 - unsigned long *size);
270 -
271 -/* Read and unpack an object file into memory, write memory to an object file */
272 -int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
273 -
274 -void hash_object_file(const struct git_hash_algo *algo, const void *buf,
275 - unsigned long len, enum object_type type,
276 - struct object_id *oid);
277 -
278 -/*
279 - * Add an object file to the in-memory object store, without writing it
280 - * to disk.
281 - *
282 - * Callers are responsible for calling write_object_file to record the
283 - * object in persistent storage before writing any other new objects
284 - * that reference it.
285 - */
286 -int pretend_object_file(struct repository *repo,
287 - void *buf, unsigned long len, enum object_type type,
288 - struct object_id *oid);
289 -
290 -struct object_info {
291 - /* Request */
292 - enum object_type *typep;
293 - unsigned long *sizep;
294 - off_t *disk_sizep;
295 - struct object_id *delta_base_oid;
296 - struct strbuf *type_name;
297 - void **contentp;
298 -
299 - /* Response */
300 - enum {
301 - OI_CACHED,
302 - OI_LOOSE,
303 - OI_PACKED,
304 - OI_DBCACHED
305 - } whence;
306 - union {
307 - /*
308 - * struct {
309 - * ... Nothing to expose in this case
310 - * } cached;
311 - * struct {
312 - * ... Nothing to expose in this case
313 - * } loose;
314 - */
315 - struct {
316 - struct packed_git *pack;
317 - off_t offset;
318 - unsigned int is_delta;
319 - } packed;
320 - } u;
321 -};
322 -
323 -/*
324 - * Initializer for a "struct object_info" that wants no items. You may
325 - * also memset() the memory to all-zeroes.
326 - */
327 -#define OBJECT_INFO_INIT { 0 }
328 -
329 -/* Invoke lookup_replace_object() on the given hash */
330 -#define OBJECT_INFO_LOOKUP_REPLACE 1
331 -/* Allow reading from a loose object file of unknown/bogus type */
332 -#define OBJECT_INFO_ALLOW_UNKNOWN_TYPE 2
333 -/* Do not retry packed storage after checking packed and loose storage */
334 -#define OBJECT_INFO_QUICK 8
335 -/*
336 - * Do not attempt to fetch the object if missing (even if fetch_is_missing is
337 - * nonzero).
338 - */
339 -#define OBJECT_INFO_SKIP_FETCH_OBJECT 16
340 -/*
341 - * This is meant for bulk prefetching of missing blobs in a partial
342 - * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
343 - */
344 -#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
345 -
346 -/* Die if object corruption (not just an object being missing) was detected. */
347 -#define OBJECT_INFO_DIE_IF_CORRUPT 32
348 -
349 -int oid_object_info_extended(struct repository *r,
350 - const struct object_id *,
351 - struct object_info *, unsigned flags);
352 -
353 -/* Retry packed storage after checking packed and loose storage */
354 -#define HAS_OBJECT_RECHECK_PACKED 1
355 -
356 -/*
357 - * Returns 1 if the object exists. This function will not lazily fetch objects
358 - * in a partial clone.
359 - */
360 -int has_object(struct repository *r, const struct object_id *oid,
361 - unsigned flags);
362 -
363 -/*
364 - * These macros and functions are deprecated. If checking existence for an
365 - * object that is likely to be missing and/or whose absence is relatively
366 - * inconsequential (or is consequential but the caller is prepared to handle
367 - * it), use has_object(), which has better defaults (no lazy fetch in a partial
368 - * clone and no rechecking of packed storage). In the unlikely event that a
369 - * caller needs to assert existence of an object that it fully expects to
370 - * exist, and wants to trigger a lazy fetch in a partial clone, use
371 - * oid_object_info_extended() with a NULL struct object_info.
372 - *
373 - * These functions can be removed once all callers have migrated to
374 - * has_object() and/or oid_object_info_extended().
375 - */
376 -int repo_has_object_file(struct repository *r, const struct object_id *oid);
377 -int repo_has_object_file_with_flags(struct repository *r,
378 - const struct object_id *oid, int flags);
379 -
380 -void assert_oid_type(const struct object_id *oid, enum object_type expect);
381 -
382 -/*
383 - * Enabling the object read lock allows multiple threads to safely call the
384 - * following functions in parallel: repo_read_object_file(),
385 - * read_object_with_reference(), oid_object_info() and oid_object_info_extended().
386 - *
387 - * obj_read_lock() and obj_read_unlock() may also be used to protect other
388 - * section which cannot execute in parallel with object reading. Since the used
389 - * lock is a recursive mutex, these sections can even contain calls to object
390 - * reading functions. However, beware that in these cases zlib inflation won't
391 - * be performed in parallel, losing performance.
392 - *
393 - * TODO: oid_object_info_extended()'s call stack has a recursive behavior. If
394 - * any of its callees end up calling it, this recursive call won't benefit from
395 - * parallel inflation.
396 - */
397 -void enable_obj_read_lock(void);
398 -void disable_obj_read_lock(void);
399 -
400 -extern int obj_read_use_lock;
401 -extern pthread_mutex_t obj_read_mutex;
402 -
403 -static inline void obj_read_lock(void)
404 -{
405 - if(obj_read_use_lock)
406 - pthread_mutex_lock(&obj_read_mutex);
407 -}
408 -
409 -static inline void obj_read_unlock(void)
410 -{
411 - if(obj_read_use_lock)
412 - pthread_mutex_unlock(&obj_read_mutex);
413 -}
414 -
415 -/*
416 - * Iterate over the files in the loose-object parts of the object
417 - * directory "path", triggering the following callbacks:
418 - *
419 - * - loose_object is called for each loose object we find.
420 - *
421 - * - loose_cruft is called for any files that do not appear to be
422 - * loose objects. Note that we only look in the loose object
423 - * directories "objects/[0-9a-f]{2}/", so we will not report
424 - * "objects/foobar" as cruft.
425 - *
426 - * - loose_subdir is called for each top-level hashed subdirectory
427 - * of the object directory (e.g., "$OBJDIR/f0"). It is called
428 - * after the objects in the directory are processed.
429 - *
430 - * Any callback that is NULL will be ignored. Callbacks returning non-zero
431 - * will end the iteration.
432 - *
433 - * In the "buf" variant, "path" is a strbuf which will also be used as a
434 - * scratch buffer, but restored to its original contents before
435 - * the function returns.
436 - */
437 -typedef int each_loose_object_fn(const struct object_id *oid,
438 - const char *path,
439 - void *data);
440 -typedef int each_loose_cruft_fn(const char *basename,
441 - const char *path,
442 - void *data);
443 -typedef int each_loose_subdir_fn(unsigned int nr,
444 - const char *path,
445 - void *data);
446 -int for_each_file_in_obj_subdir(unsigned int subdir_nr,
447 - struct strbuf *path,
448 - each_loose_object_fn obj_cb,
449 - each_loose_cruft_fn cruft_cb,
450 - each_loose_subdir_fn subdir_cb,
451 - void *data);
452 -int for_each_loose_file_in_objdir(const char *path,
453 - each_loose_object_fn obj_cb,
454 - each_loose_cruft_fn cruft_cb,
455 - each_loose_subdir_fn subdir_cb,
456 - void *data);
457 -int for_each_loose_file_in_objdir_buf(struct strbuf *path,
458 - each_loose_object_fn obj_cb,
459 - each_loose_cruft_fn cruft_cb,
460 - each_loose_subdir_fn subdir_cb,
461 - void *data);
462 -
463 -/* Flags for for_each_*_object() below. */
464 -enum for_each_object_flags {
465 - /* Iterate only over local objects, not alternates. */
466 - FOR_EACH_OBJECT_LOCAL_ONLY = (1<<0),
467 -
468 - /* Only iterate over packs obtained from the promisor remote. */
469 - FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
470 -
471 - /*
472 - * Visit objects within a pack in packfile order rather than .idx order
473 - */
474 - FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
475 -
476 - /* Only iterate over packs that are not marked as kept in-core. */
477 - FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
478 -
479 - /* Only iterate over packs that do not have .keep files. */
480 - FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
481 -};
482 -
483 -/*
484 - * Iterate over all accessible loose objects without respect to
485 - * reachability. By default, this includes both local and alternate objects.
486 - * The order in which objects are visited is unspecified.
487 - *
488 - * Any flags specific to packs are ignored.
489 - */
490 -int for_each_loose_object(each_loose_object_fn, void *,
491 - enum for_each_object_flags flags);
492 -
493 -/*
494 - * Iterate over all accessible packed objects without respect to reachability.
495 - * By default, this includes both local and alternate packs.
496 - *
497 - * Note that some objects may appear twice if they are found in multiple packs.
498 - * Each pack is visited in an unspecified order. By default, objects within a
499 - * pack are visited in pack-idx order (i.e., sorted by oid).
500 - */
501 -typedef int each_packed_object_fn(const struct object_id *oid,
502 - struct packed_git *pack,
503 - uint32_t pos,
504 - void *data);
505 -int for_each_object_in_pack(struct packed_git *p,
506 - each_packed_object_fn, void *data,
507 - enum for_each_object_flags flags);
508 -int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
509 - void *data, enum for_each_object_flags flags);
510 -
511 -void *read_object_with_reference(struct repository *r,
512 - const struct object_id *oid,
513 - enum object_type required_type,
514 - unsigned long *size,
515 - struct object_id *oid_ret);
516 -
517 -#endif /* OBJECT_STORE_LL_H */
object-store.c
+5
@@ -4,9 +4,11 @@
4 #include "abspath.h"
5 #include "commit-graph.h"
6 #include "config.h"
7 +#include "dir.h"
8 #include "environment.h"
9 #include "gettext.h"
10 #include "hex.h"
11 +#include "khash.h"
12 #include "lockfile.h"
13 #include "loose.h"
14 #include "object-file-convert.h"
@@ -24,6 +26,9 @@
26 #include "submodule.h"
27 #include "write-or-die.h"
28
29 +KHASH_INIT(odb_path_map, const char * /* key: odb_path */,
30 + struct object_directory *, 1, fspathhash, fspatheq)
31 +
32 /*
33 * This is meant to hold a *small* number of objects that you would
34 * want repo_read_object_file() to be able to return, but yet you do not want
object-store.h
+511 -5
@@ -1,11 +1,517 @@
1 #ifndef OBJECT_STORE_H
2 #define OBJECT_STORE_H
3
4 -#include "khash.h"
5 -#include "dir.h"
6 -#include "object-store-ll.h"
4 +#include "hashmap.h"
5 +#include "object.h"
6 +#include "list.h"
7 +#include "oidset.h"
8 +#include "thread-utils.h"
9
8 -KHASH_INIT(odb_path_map, const char * /* key: odb_path */,
9 - struct object_directory *, 1, fspathhash, fspatheq)
10 +struct oidmap;
11 +struct oidtree;
12 +struct strbuf;
13 +struct repository;
14 +
15 +struct object_directory {
16 + struct object_directory *next;
17 +
18 + /*
19 + * Used to store the results of readdir(3) calls when we are OK
20 + * sacrificing accuracy due to races for speed. That includes
21 + * object existence with OBJECT_INFO_QUICK, as well as
22 + * our search for unique abbreviated hashes. Don't use it for tasks
23 + * requiring greater accuracy!
24 + *
25 + * Be sure to call odb_load_loose_cache() before using.
26 + */
27 + uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
28 + struct oidtree *loose_objects_cache;
29 +
30 + /* Map between object IDs for loose objects. */
31 + struct loose_object_map *loose_map;
32 +
33 + /*
34 + * This is a temporary object store created by the tmp_objdir
35 + * facility. Disable ref updates since the objects in the store
36 + * might be discarded on rollback.
37 + */
38 + int disable_ref_updates;
39 +
40 + /*
41 + * This object store is ephemeral, so there is no need to fsync.
42 + */
43 + int will_destroy;
44 +
45 + /*
46 + * Path to the alternative object store. If this is a relative path,
47 + * it is relative to the current working directory.
48 + */
49 + char *path;
50 +};
51 +
52 +void prepare_alt_odb(struct repository *r);
53 +int has_alt_odb(struct repository *r);
54 +char *compute_alternate_path(const char *path, struct strbuf *err);
55 +struct object_directory *find_odb(struct repository *r, const char *obj_dir);
56 +typedef int alt_odb_fn(struct object_directory *, void *);
57 +int foreach_alt_odb(alt_odb_fn, void*);
58 +typedef void alternate_ref_fn(const struct object_id *oid, void *);
59 +void for_each_alternate_ref(alternate_ref_fn, void *);
60 +
61 +/*
62 + * Add the directory to the on-disk alternates file; the new entry will also
63 + * take effect in the current process.
64 + */
65 +void add_to_alternates_file(const char *dir);
66 +
67 +/*
68 + * Add the directory to the in-memory list of alternates (along with any
69 + * recursive alternates it points to), but do not modify the on-disk alternates
70 + * file.
71 + */
72 +void add_to_alternates_memory(const char *dir);
73 +
74 +/*
75 + * Replace the current writable object directory with the specified temporary
76 + * object directory; returns the former primary object directory.
77 + */
78 +struct object_directory *set_temporary_primary_odb(const char *dir, int will_destroy);
79 +
80 +/*
81 + * Restore a previous ODB replaced by set_temporary_main_odb.
82 + */
83 +void restore_primary_odb(struct object_directory *restore_odb, const char *old_path);
84 +
85 +/*
86 + * Populate and return the loose object cache array corresponding to the
87 + * given object ID.
88 + */
89 +struct oidtree *odb_loose_cache(struct object_directory *odb,
90 + const struct object_id *oid);
91 +
92 +/* Empty the loose object cache for the specified object directory. */
93 +void odb_clear_loose_cache(struct object_directory *odb);
94 +
95 +struct packed_git {
96 + struct hashmap_entry packmap_ent;
97 + struct packed_git *next;
98 + struct list_head mru;
99 + struct pack_window *windows;
100 + off_t pack_size;
101 + const void *index_data;
102 + size_t index_size;
103 + uint32_t num_objects;
104 + size_t crc_offset;
105 + struct oidset bad_objects;
106 + int index_version;
107 + time_t mtime;
108 + int pack_fd;
109 + int index; /* for builtin/pack-objects.c */
110 + unsigned pack_local:1,
111 + pack_keep:1,
112 + pack_keep_in_core:1,
113 + freshened:1,
114 + do_not_close:1,
115 + pack_promisor:1,
116 + multi_pack_index:1,
117 + is_cruft:1;
118 + unsigned char hash[GIT_MAX_RAWSZ];
119 + struct revindex_entry *revindex;
120 + const uint32_t *revindex_data;
121 + const uint32_t *revindex_map;
122 + size_t revindex_size;
123 + /*
124 + * mtimes_map points at the beginning of the memory mapped region of
125 + * this pack's corresponding .mtimes file, and mtimes_size is the size
126 + * of that .mtimes file
127 + */
128 + const uint32_t *mtimes_map;
129 + size_t mtimes_size;
130 +
131 + /* repo denotes the repository this packfile belongs to */
132 + struct repository *repo;
133 +
134 + /* something like ".git/objects/pack/xxxxx.pack" */
135 + char pack_name[FLEX_ARRAY]; /* more */
136 +};
137 +
138 +struct multi_pack_index;
139 +
140 +static inline int pack_map_entry_cmp(const void *cmp_data UNUSED,
141 + const struct hashmap_entry *entry,
142 + const struct hashmap_entry *entry2,
143 + const void *keydata)
144 +{
145 + const char *key = keydata;
146 + const struct packed_git *pg1, *pg2;
147 +
148 + pg1 = container_of(entry, const struct packed_git, packmap_ent);
149 + pg2 = container_of(entry2, const struct packed_git, packmap_ent);
150 +
151 + return strcmp(pg1->pack_name, key ? key : pg2->pack_name);
152 +}
153 +
154 +struct cached_object_entry;
155 +
156 +struct raw_object_store {
157 + /*
158 + * Set of all object directories; the main directory is first (and
159 + * cannot be NULL after initialization). Subsequent directories are
160 + * alternates.
161 + */
162 + struct object_directory *odb;
163 + struct object_directory **odb_tail;
164 + struct kh_odb_path_map *odb_by_path;
165 +
166 + int loaded_alternates;
167 +
168 + /*
169 + * A list of alternate object directories loaded from the environment;
170 + * this should not generally need to be accessed directly, but will
171 + * populate the "odb" list when prepare_alt_odb() is run.
172 + */
173 + char *alternate_db;
174 +
175 + /*
176 + * Objects that should be substituted by other objects
177 + * (see git-replace(1)).
178 + */
179 + struct oidmap *replace_map;
180 + unsigned replace_map_initialized : 1;
181 + pthread_mutex_t replace_mutex; /* protect object replace functions */
182 +
183 + struct commit_graph *commit_graph;
184 + unsigned commit_graph_attempted : 1; /* if loading has been attempted */
185 +
186 + /*
187 + * private data
188 + *
189 + * should only be accessed directly by packfile.c and midx.c
190 + */
191 + struct multi_pack_index *multi_pack_index;
192 +
193 + /*
194 + * private data
195 + *
196 + * should only be accessed directly by packfile.c
197 + */
198 +
199 + struct packed_git *packed_git;
200 + /* A most-recently-used ordered version of the packed_git list. */
201 + struct list_head packed_git_mru;
202 +
203 + struct {
204 + struct packed_git **packs;
205 + unsigned flags;
206 + } kept_pack_cache;
207 +
208 + /*
209 + * This is meant to hold a *small* number of objects that you would
210 + * want repo_read_object_file() to be able to return, but yet you do not want
211 + * to write them into the object store (e.g. a browse-only
212 + * application).
213 + */
214 + struct cached_object_entry *cached_objects;
215 + size_t cached_object_nr, cached_object_alloc;
216 +
217 + /*
218 + * A map of packfiles to packed_git structs for tracking which
219 + * packs have been loaded already.
220 + */
221 + struct hashmap pack_map;
222 +
223 + /*
224 + * A fast, rough count of the number of objects in the repository.
225 + * These two fields are not meant for direct access. Use
226 + * repo_approximate_object_count() instead.
227 + */
228 + unsigned long approximate_object_count;
229 + unsigned approximate_object_count_valid : 1;
230 +
231 + /*
232 + * Whether packed_git has already been populated with this repository's
233 + * packs.
234 + */
235 + unsigned packed_git_initialized : 1;
236 +};
237 +
238 +struct raw_object_store *raw_object_store_new(void);
239 +void raw_object_store_clear(struct raw_object_store *o);
240 +
241 +/*
242 + * Create a temporary file rooted in the object database directory, or
243 + * die on failure. The filename is taken from "pattern", which should have the
244 + * usual "XXXXXX" trailer, and the resulting filename is written into the
245 + * "template" buffer. Returns the open descriptor.
246 + */
247 +int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
248 +
249 +/*
250 + * Create a pack .keep file named "name" (which should generally be the output
251 + * of odb_pack_name). Returns a file descriptor opened for writing, or -1 on
252 + * error.
253 + */
254 +int odb_pack_keep(const char *name);
255 +
256 +/*
257 + * Put in `buf` the name of the file in the local object database that
258 + * would be used to store a loose object with the specified oid.
259 + */
260 +const char *loose_object_path(struct repository *r, struct strbuf *buf,
261 + const struct object_id *oid);
262 +
263 +void *map_loose_object(struct repository *r, const struct object_id *oid,
264 + unsigned long *size);
265 +
266 +void *repo_read_object_file(struct repository *r,
267 + const struct object_id *oid,
268 + enum object_type *type,
269 + unsigned long *size);
270 +
271 +/* Read and unpack an object file into memory, write memory to an object file */
272 +int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
273 +
274 +void hash_object_file(const struct git_hash_algo *algo, const void *buf,
275 + unsigned long len, enum object_type type,
276 + struct object_id *oid);
277 +
278 +/*
279 + * Add an object file to the in-memory object store, without writing it
280 + * to disk.
281 + *
282 + * Callers are responsible for calling write_object_file to record the
283 + * object in persistent storage before writing any other new objects
284 + * that reference it.
285 + */
286 +int pretend_object_file(struct repository *repo,
287 + void *buf, unsigned long len, enum object_type type,
288 + struct object_id *oid);
289 +
290 +struct object_info {
291 + /* Request */
292 + enum object_type *typep;
293 + unsigned long *sizep;
294 + off_t *disk_sizep;
295 + struct object_id *delta_base_oid;
296 + struct strbuf *type_name;
297 + void **contentp;
298 +
299 + /* Response */
300 + enum {
301 + OI_CACHED,
302 + OI_LOOSE,
303 + OI_PACKED,
304 + OI_DBCACHED
305 + } whence;
306 + union {
307 + /*
308 + * struct {
309 + * ... Nothing to expose in this case
310 + * } cached;
311 + * struct {
312 + * ... Nothing to expose in this case
313 + * } loose;
314 + */
315 + struct {
316 + struct packed_git *pack;
317 + off_t offset;
318 + unsigned int is_delta;
319 + } packed;
320 + } u;
321 +};
322 +
323 +/*
324 + * Initializer for a "struct object_info" that wants no items. You may
325 + * also memset() the memory to all-zeroes.
326 + */
327 +#define OBJECT_INFO_INIT { 0 }
328 +
329 +/* Invoke lookup_replace_object() on the given hash */
330 +#define OBJECT_INFO_LOOKUP_REPLACE 1
331 +/* Allow reading from a loose object file of unknown/bogus type */
332 +#define OBJECT_INFO_ALLOW_UNKNOWN_TYPE 2
333 +/* Do not retry packed storage after checking packed and loose storage */
334 +#define OBJECT_INFO_QUICK 8
335 +/*
336 + * Do not attempt to fetch the object if missing (even if fetch_is_missing is
337 + * nonzero).
338 + */
339 +#define OBJECT_INFO_SKIP_FETCH_OBJECT 16
340 +/*
341 + * This is meant for bulk prefetching of missing blobs in a partial
342 + * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
343 + */
344 +#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
345 +
346 +/* Die if object corruption (not just an object being missing) was detected. */
347 +#define OBJECT_INFO_DIE_IF_CORRUPT 32
348 +
349 +int oid_object_info_extended(struct repository *r,
350 + const struct object_id *,
351 + struct object_info *, unsigned flags);
352 +
353 +/* Retry packed storage after checking packed and loose storage */
354 +#define HAS_OBJECT_RECHECK_PACKED 1
355 +
356 +/*
357 + * Returns 1 if the object exists. This function will not lazily fetch objects
358 + * in a partial clone.
359 + */
360 +int has_object(struct repository *r, const struct object_id *oid,
361 + unsigned flags);
362 +
363 +/*
364 + * These macros and functions are deprecated. If checking existence for an
365 + * object that is likely to be missing and/or whose absence is relatively
366 + * inconsequential (or is consequential but the caller is prepared to handle
367 + * it), use has_object(), which has better defaults (no lazy fetch in a partial
368 + * clone and no rechecking of packed storage). In the unlikely event that a
369 + * caller needs to assert existence of an object that it fully expects to
370 + * exist, and wants to trigger a lazy fetch in a partial clone, use
371 + * oid_object_info_extended() with a NULL struct object_info.
372 + *
373 + * These functions can be removed once all callers have migrated to
374 + * has_object() and/or oid_object_info_extended().
375 + */
376 +int repo_has_object_file(struct repository *r, const struct object_id *oid);
377 +int repo_has_object_file_with_flags(struct repository *r,
378 + const struct object_id *oid, int flags);
379 +
380 +void assert_oid_type(const struct object_id *oid, enum object_type expect);
381 +
382 +/*
383 + * Enabling the object read lock allows multiple threads to safely call the
384 + * following functions in parallel: repo_read_object_file(),
385 + * read_object_with_reference(), oid_object_info() and oid_object_info_extended().
386 + *
387 + * obj_read_lock() and obj_read_unlock() may also be used to protect other
388 + * section which cannot execute in parallel with object reading. Since the used
389 + * lock is a recursive mutex, these sections can even contain calls to object
390 + * reading functions. However, beware that in these cases zlib inflation won't
391 + * be performed in parallel, losing performance.
392 + *
393 + * TODO: oid_object_info_extended()'s call stack has a recursive behavior. If
394 + * any of its callees end up calling it, this recursive call won't benefit from
395 + * parallel inflation.
396 + */
397 +void enable_obj_read_lock(void);
398 +void disable_obj_read_lock(void);
399 +
400 +extern int obj_read_use_lock;
401 +extern pthread_mutex_t obj_read_mutex;
402 +
403 +static inline void obj_read_lock(void)
404 +{
405 + if(obj_read_use_lock)
406 + pthread_mutex_lock(&obj_read_mutex);
407 +}
408 +
409 +static inline void obj_read_unlock(void)
410 +{
411 + if(obj_read_use_lock)
412 + pthread_mutex_unlock(&obj_read_mutex);
413 +}
414 +
415 +/*
416 + * Iterate over the files in the loose-object parts of the object
417 + * directory "path", triggering the following callbacks:
418 + *
419 + * - loose_object is called for each loose object we find.
420 + *
421 + * - loose_cruft is called for any files that do not appear to be
422 + * loose objects. Note that we only look in the loose object
423 + * directories "objects/[0-9a-f]{2}/", so we will not report
424 + * "objects/foobar" as cruft.
425 + *
426 + * - loose_subdir is called for each top-level hashed subdirectory
427 + * of the object directory (e.g., "$OBJDIR/f0"). It is called
428 + * after the objects in the directory are processed.
429 + *
430 + * Any callback that is NULL will be ignored. Callbacks returning non-zero
431 + * will end the iteration.
432 + *
433 + * In the "buf" variant, "path" is a strbuf which will also be used as a
434 + * scratch buffer, but restored to its original contents before
435 + * the function returns.
436 + */
437 +typedef int each_loose_object_fn(const struct object_id *oid,
438 + const char *path,
439 + void *data);
440 +typedef int each_loose_cruft_fn(const char *basename,
441 + const char *path,
442 + void *data);
443 +typedef int each_loose_subdir_fn(unsigned int nr,
444 + const char *path,
445 + void *data);
446 +int for_each_file_in_obj_subdir(unsigned int subdir_nr,
447 + struct strbuf *path,
448 + each_loose_object_fn obj_cb,
449 + each_loose_cruft_fn cruft_cb,
450 + each_loose_subdir_fn subdir_cb,
451 + void *data);
452 +int for_each_loose_file_in_objdir(const char *path,
453 + each_loose_object_fn obj_cb,
454 + each_loose_cruft_fn cruft_cb,
455 + each_loose_subdir_fn subdir_cb,
456 + void *data);
457 +int for_each_loose_file_in_objdir_buf(struct strbuf *path,
458 + each_loose_object_fn obj_cb,
459 + each_loose_cruft_fn cruft_cb,
460 + each_loose_subdir_fn subdir_cb,
461 + void *data);
462 +
463 +/* Flags for for_each_*_object() below. */
464 +enum for_each_object_flags {
465 + /* Iterate only over local objects, not alternates. */
466 + FOR_EACH_OBJECT_LOCAL_ONLY = (1<<0),
467 +
468 + /* Only iterate over packs obtained from the promisor remote. */
469 + FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
470 +
471 + /*
472 + * Visit objects within a pack in packfile order rather than .idx order
473 + */
474 + FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
475 +
476 + /* Only iterate over packs that are not marked as kept in-core. */
477 + FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
478 +
479 + /* Only iterate over packs that do not have .keep files. */
480 + FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
481 +};
482 +
483 +/*
484 + * Iterate over all accessible loose objects without respect to
485 + * reachability. By default, this includes both local and alternate objects.
486 + * The order in which objects are visited is unspecified.
487 + *
488 + * Any flags specific to packs are ignored.
489 + */
490 +int for_each_loose_object(each_loose_object_fn, void *,
491 + enum for_each_object_flags flags);
492 +
493 +/*
494 + * Iterate over all accessible packed objects without respect to reachability.
495 + * By default, this includes both local and alternate packs.
496 + *
497 + * Note that some objects may appear twice if they are found in multiple packs.
498 + * Each pack is visited in an unspecified order. By default, objects within a
499 + * pack are visited in pack-idx order (i.e., sorted by oid).
500 + */
501 +typedef int each_packed_object_fn(const struct object_id *oid,
502 + struct packed_git *pack,
503 + uint32_t pos,
504 + void *data);
505 +int for_each_object_in_pack(struct packed_git *p,
506 + each_packed_object_fn, void *data,
507 + enum for_each_object_flags flags);
508 +int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
509 + void *data, enum for_each_object_flags flags);
510 +
511 +void *read_object_with_reference(struct repository *r,
512 + const struct object_id *oid,
513 + enum object_type required_type,
514 + unsigned long *size,
515 + struct object_id *oid_ret);
516
517 #endif /* OBJECT_STORE_H */
oss-fuzz/fuzz-pack-idx.c
+1 -1
@@ -1,5 +1,5 @@
1 #include "git-compat-util.h"
2 -#include "object-store-ll.h"
2 +#include "object-store.h"
3 #include "packfile.h"
4
5 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
pack-bitmap-write.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "environment.h"
5 #include "gettext.h"
6 #include "hex.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8 #include "commit.h"
9 #include "diff.h"
10 #include "revision.h"
pack-bitmap.c
+1 -1
@@ -17,7 +17,7 @@
17 #include "packfile.h"
18 #include "repository.h"
19 #include "trace2.h"
20 -#include "object-store-ll.h"
20 +#include "object-store.h"
21 #include "list-objects-filter-options.h"
22 #include "midx.h"
23 #include "config.h"
pack-check.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "progress.h"
9 #include "packfile.h"
10 #include "object-file.h"
11 -#include "object-store-ll.h"
11 +#include "object-store.h"
12
13 struct idx_entry {
14 off_t offset;
pack-mtimes.c
+1 -1
@@ -1,7 +1,7 @@
1 #include "git-compat-util.h"
2 #include "gettext.h"
3 #include "pack-mtimes.h"
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "packfile.h"
6 #include "strbuf.h"
7
pack-objects.h
+1 -1
@@ -1,7 +1,7 @@
1 #ifndef PACK_OBJECTS_H
2 #define PACK_OBJECTS_H
3
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "thread-utils.h"
6 #include "pack.h"
7
pack-revindex.c
+1 -1
@@ -1,7 +1,7 @@
1 #include "git-compat-util.h"
2 #include "gettext.h"
3 #include "pack-revindex.h"
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "packfile.h"
6 #include "strbuf.h"
7 #include "trace2.h"
packfile.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "tree-walk.h"
20 #include "tree.h"
21 #include "object-file.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "midx.h"
24 #include "commit-graph.h"
25 #include "pack-revindex.h"
path.c
+1 -1
@@ -15,7 +15,7 @@
15 #include "submodule-config.h"
16 #include "path.h"
17 #include "packfile.h"
18 -#include "object-store-ll.h"
18 +#include "object-store.h"
19 #include "lockfile.h"
20 #include "exec-cmd.h"
21
promisor-remote.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "git-compat-util.h"
4 #include "gettext.h"
5 #include "hex.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7 #include "promisor-remote.h"
8 #include "config.h"
9 #include "trace2.h"
protocol-caps.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "hash.h"
7 #include "hex.h"
8 #include "object.h"
9 -#include "object-store-ll.h"
9 +#include "object-store.h"
10 #include "repository.h"
11 #include "string-list.h"
12 #include "strbuf.h"
prune-packed.c
+1 -1
@@ -2,7 +2,7 @@
2
3 #include "git-compat-util.h"
4 #include "gettext.h"
5 -#include "object-store-ll.h"
5 +#include "object-store.h"
6 #include "packfile.h"
7 #include "progress.h"
8 #include "prune-packed.h"
reachable.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "list-objects.h"
15 #include "packfile.h"
16 #include "worktree.h"
17 -#include "object-store-ll.h"
17 +#include "object-store.h"
18 #include "pack-bitmap.h"
19 #include "pack-mtimes.h"
20 #include "config.h"
read-cache.c
+1 -1
@@ -20,7 +20,7 @@
20 #include "refs.h"
21 #include "dir.h"
22 #include "object-file.h"
23 -#include "object-store-ll.h"
23 +#include "object-store.h"
24 #include "oid-array.h"
25 #include "tree.h"
26 #include "commit.h"
ref-filter.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "refs.h"
13 #include "wildmatch.h"
14 #include "object-name.h"
15 -#include "object-store-ll.h"
15 +#include "object-store.h"
16 #include "oid-array.h"
17 #include "repo-settings.h"
18 #include "repository.h"
reflog.c
+1 -1
@@ -3,7 +3,7 @@
3
4 #include "git-compat-util.h"
5 #include "gettext.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7 #include "reflog.h"
8 #include "refs.h"
9 #include "revision.h"
refs.c
+1 -1
@@ -19,7 +19,7 @@
19 #include "run-command.h"
20 #include "hook.h"
21 #include "object-name.h"
22 -#include "object-store-ll.h"
22 +#include "object-store.h"
23 #include "object.h"
24 #include "path.h"
25 #include "submodule.h"
remote.c
+1 -1
@@ -12,7 +12,7 @@
12 #include "refs.h"
13 #include "refspec.h"
14 #include "object-name.h"
15 -#include "object-store-ll.h"
15 +#include "object-store.h"
16 #include "path.h"
17 #include "commit.h"
18 #include "diff.h"
replace-object.c
+1 -1
@@ -2,7 +2,7 @@
2 #include "gettext.h"
3 #include "hex.h"
4 #include "oidmap.h"
5 -#include "object-store-ll.h"
5 +#include "object-store.h"
6 #include "replace-object.h"
7 #include "refs.h"
8 #include "repository.h"
replace-object.h
+1 -1
@@ -3,7 +3,7 @@
3
4 #include "oidmap.h"
5 #include "repository.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7
8 struct replace_object {
9 struct oidmap_entry original;
repository.c
+1 -1
@@ -1,7 +1,7 @@
1 #include "git-compat-util.h"
2 #include "abspath.h"
3 #include "repository.h"
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "config.h"
6 #include "object.h"
7 #include "lockfile.h"
rerere.c
+1 -1
@@ -18,7 +18,7 @@
18 #include "path.h"
19 #include "pathspec.h"
20 #include "object-file.h"
21 -#include "object-store-ll.h"
21 +#include "object-store.h"
22 #include "strmap.h"
23
24 #define RESOLVED 0
revision.c
+1 -1
@@ -8,7 +8,7 @@
8 #include "hex.h"
9 #include "object-name.h"
10 #include "object-file.h"
11 -#include "object-store-ll.h"
11 +#include "object-store.h"
12 #include "oidset.h"
13 #include "tag.h"
14 #include "blob.h"
send-pack.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "date.h"
5 #include "gettext.h"
6 #include "hex.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8 #include "pkt-line.h"
9 #include "sideband.h"
10 #include "run-command.h"
sequencer.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "dir.h"
14 #include "object-file.h"
15 #include "object-name.h"
16 -#include "object-store-ll.h"
16 +#include "object-store.h"
17 #include "object.h"
18 #include "pager.h"
19 #include "commit.h"
server-info.c
+1 -1
@@ -11,7 +11,7 @@
11 #include "packfile.h"
12 #include "path.h"
13 #include "object-file.h"
14 -#include "object-store-ll.h"
14 +#include "object-store.h"
15 #include "server-info.h"
16 #include "strbuf.h"
17 #include "tempfile.h"
shallow.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "repository.h"
6 #include "tempfile.h"
7 #include "lockfile.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "commit.h"
10 #include "tag.h"
11 #include "pkt-line.h"
streaming.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "streaming.h"
11 #include "repository.h"
12 #include "object-file.h"
13 -#include "object-store-ll.h"
13 +#include "object-store.h"
14 #include "replace-object.h"
15 #include "packfile.h"
16
submodule-config.c
+1 -1
@@ -13,7 +13,7 @@
13 #include "submodule.h"
14 #include "strbuf.h"
15 #include "object-name.h"
16 -#include "object-store-ll.h"
16 +#include "object-store.h"
17 #include "parse-options.h"
18 #include "thread-utils.h"
19 #include "tree-walk.h"
submodule.c
+1 -1
@@ -27,7 +27,7 @@
27 #include "parse-options.h"
28 #include "object-file.h"
29 #include "object-name.h"
30 -#include "object-store-ll.h"
30 +#include "object-store.h"
31 #include "commit-reach.h"
32 #include "read-cache-ll.h"
33 #include "setup.h"
t/helper/test-pack-mtimes.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "test-tool.h"
4 #include "hex.h"
5 #include "strbuf.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7 #include "packfile.h"
8 #include "pack-mtimes.h"
9 #include "setup.h"
t/helper/test-partial-clone.c
+1 -1
@@ -1,7 +1,7 @@
1 #include "test-tool.h"
2 #include "hex.h"
3 #include "repository.h"
4 -#include "object-store-ll.h"
4 +#include "object-store.h"
5 #include "setup.h"
6
7 /*
t/helper/test-read-graph.c
+1 -1
@@ -3,7 +3,7 @@
3 #include "test-tool.h"
4 #include "commit-graph.h"
5 #include "repository.h"
6 -#include "object-store-ll.h"
6 +#include "object-store.h"
7 #include "bloom.h"
8 #include "setup.h"
9
t/helper/test-read-midx.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "hex.h"
5 #include "midx.h"
6 #include "repository.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8 #include "pack-bitmap.h"
9 #include "packfile.h"
10 #include "setup.h"
t/helper/test-ref-store.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "refs.h"
6 #include "setup.h"
7 #include "worktree.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "path.h"
10 #include "repository.h"
11 #include "strbuf.h"
tag.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "environment.h"
6 #include "tag.h"
7 #include "object-name.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "commit.h"
10 #include "tree.h"
11 #include "blob.h"
tmp-objdir.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "strbuf.h"
11 #include "strvec.h"
12 #include "quote.h"
13 -#include "object-store-ll.h"
13 +#include "object-store.h"
14 #include "repository.h"
15
16 struct tmp_objdir {
tree-walk.c
+1 -1
@@ -6,7 +6,7 @@
6 #include "gettext.h"
7 #include "hex.h"
8 #include "object-file.h"
9 -#include "object-store-ll.h"
9 +#include "object-store.h"
10 #include "trace2.h"
11 #include "tree.h"
12 #include "pathspec.h"
tree.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "hex.h"
5 #include "tree.h"
6 #include "object-name.h"
7 -#include "object-store-ll.h"
7 +#include "object-store.h"
8 #include "commit.h"
9 #include "alloc.h"
10 #include "tree-walk.h"
unpack-trees.c
+1 -1
@@ -26,7 +26,7 @@
26 #include "symlinks.h"
27 #include "trace2.h"
28 #include "fsmonitor.h"
29 -#include "object-store-ll.h"
29 +#include "object-store.h"
30 #include "promisor-remote.h"
31 #include "entry.h"
32 #include "parallel-checkout.h"
upload-pack.c
+1 -1
@@ -10,7 +10,7 @@
10 #include "pkt-line.h"
11 #include "sideband.h"
12 #include "repository.h"
13 -#include "object-store-ll.h"
13 +#include "object-store.h"
14 #include "oid-array.h"
15 #include "object.h"
16 #include "commit.h"
walker.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "hex.h"
6 #include "walker.h"
7 #include "repository.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "commit.h"
10 #include "strbuf.h"
11 #include "tree.h"
xdiff-interface.c
+1 -1
@@ -5,7 +5,7 @@
5 #include "gettext.h"
6 #include "config.h"
7 #include "hex.h"
8 -#include "object-store-ll.h"
8 +#include "object-store.h"
9 #include "strbuf.h"
10 #include "xdiff-interface.h"
11 #include "xdiff/xtypes.h"