Skip to content

Commit 36d8035

Browse files
committed
Merge branch 'ps/object-file-cleanup'
Code clean-up. * ps/object-file-cleanup: object-store: merge "object-store-ll.h" and "object-store.h" object-store: remove global array of cached objects object: split out functions relating to object store subsystem object-file: drop `index_blob_stream()` object-file: split up concerns of `HASH_*` flags object-file: split out functions relating to object store subsystem object-file: move `xmmap()` into "wrapper.c" object-file: move `git_open_cloexec()` to "compat/open.c" object-file: move `safe_create_leading_directories()` into "path.c" object-file: move `mkdir_in_gitdir()` into "path.c"
2 parents 51ddc12 + 68cd492 commit 36d8035

File tree

149 files changed

+2144
-2064
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+2144
-2064
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ LIB_OBJS += common-exit.o
994994
LIB_OBJS += common-init.o
995995
LIB_OBJS += compat/nonblock.o
996996
LIB_OBJS += compat/obstack.o
997+
LIB_OBJS += compat/open.o
997998
LIB_OBJS += compat/terminal.o
998999
LIB_OBJS += compiler-tricks/not-constant.o
9991000
LIB_OBJS += config.o
@@ -1084,6 +1085,7 @@ LIB_OBJS += notes.o
10841085
LIB_OBJS += object-file-convert.o
10851086
LIB_OBJS += object-file.o
10861087
LIB_OBJS += object-name.o
1088+
LIB_OBJS += object-store.o
10871089
LIB_OBJS += object.o
10881090
LIB_OBJS += oid-array.o
10891091
LIB_OBJS += oidmap.o
@@ -1811,7 +1813,6 @@ ifdef FREAD_READS_DIRECTORIES
18111813
endif
18121814
ifdef OPEN_RETURNS_EINTR
18131815
COMPAT_CFLAGS += -DOPEN_RETURNS_EINTR
1814-
COMPAT_OBJS += compat/open.o
18151816
endif
18161817
ifdef NO_SYMLINK_HEAD
18171818
BASIC_CFLAGS += -DNO_SYMLINK_HEAD

apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "abspath.h"
1515
#include "base85.h"
1616
#include "config.h"
17-
#include "object-store-ll.h"
17+
#include "object-store.h"
1818
#include "delta.h"
1919
#include "diff.h"
2020
#include "dir.h"

archive-tar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "hex.h"
1212
#include "tar.h"
1313
#include "archive.h"
14-
#include "object-store-ll.h"
14+
#include "object-store.h"
1515
#include "strbuf.h"
1616
#include "streaming.h"
1717
#include "run-command.h"

archive-zip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "hex.h"
1313
#include "streaming.h"
1414
#include "utf8.h"
15-
#include "object-store-ll.h"
15+
#include "object-store.h"
1616
#include "strbuf.h"
1717
#include "userdiff.h"
1818
#include "write-or-die.h"

archive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "pretty.h"
1515
#include "setup.h"
1616
#include "refs.h"
17-
#include "object-store-ll.h"
17+
#include "object-store.h"
1818
#include "commit.h"
1919
#include "tree.h"
2020
#include "tree-walk.h"

attr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "read-cache-ll.h"
2323
#include "refs.h"
2424
#include "revision.h"
25-
#include "object-store-ll.h"
25+
#include "object-store.h"
2626
#include "setup.h"
2727
#include "thread-utils.h"
2828
#include "tree-walk.h"

bisect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "commit-slab.h"
2121
#include "commit-reach.h"
2222
#include "object-name.h"
23-
#include "object-store-ll.h"
23+
#include "object-store.h"
2424
#include "path.h"
2525
#include "dir.h"
2626

blame.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include "git-compat-util.h"
55
#include "refs.h"
6-
#include "object-store-ll.h"
6+
#include "object-store.h"
77
#include "cache-tree.h"
88
#include "mergesort.h"
99
#include "commit.h"
@@ -277,7 +277,7 @@ static struct commit *fake_working_tree_commit(struct repository *r,
277277
convert_to_git(r->index, path, buf.buf, buf.len, &buf, 0);
278278
origin->file.ptr = buf.buf;
279279
origin->file.size = buf.len;
280-
pretend_object_file(buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid);
280+
pretend_object_file(the_repository, buf.buf, buf.len, OBJ_BLOB, &origin->blob_oid);
281281

282282
/*
283283
* Read the current index, replace the path entry with

builtin/backfill.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "tree.h"
1414
#include "tree-walk.h"
1515
#include "object.h"
16-
#include "object-store-ll.h"
16+
#include "object-store.h"
1717
#include "oid-array.h"
1818
#include "oidset.h"
1919
#include "promisor-remote.h"

builtin/blame.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "line-log.h"
2929
#include "progress.h"
3030
#include "object-name.h"
31-
#include "object-store-ll.h"
31+
#include "object-store.h"
3232
#include "pager.h"
3333
#include "blame.h"
3434
#include "refs.h"

0 commit comments

Comments
 (0)