aboutsummaryrefslogtreecommitdiffstats
path: root/submodule-config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-15 15:18:17 -0700
committerJunio C Hamano <gitster@pobox.com>2025-07-15 15:18:18 -0700
commit51b50c55a93205e8cf427a9c5f9c489c6b468542 (patch)
tree2a6698c5263797d86add130f8004053e15e22e7e /submodule-config.c
parentd30e120486c5e0632d97f3cba79c03efb6dbb3cb (diff)
parent841a03b4046ab81276743b4d7e727b1658f805da (diff)
downloadgit-51b50c55a93205e8cf427a9c5f9c489c6b468542.tar.gz
Merge branch 'ps/object-store'
Code clean-up around object access API. * ps/object-store: odb: rename `read_object_with_reference()` odb: rename `pretend_object_file()` odb: rename `has_object()` odb: rename `repo_read_object_file()` odb: rename `oid_object_info()` odb: trivial refactorings to get rid of `the_repository` odb: get rid of `the_repository` when handling submodule sources odb: get rid of `the_repository` when handling the primary source odb: get rid of `the_repository` in `for_each()` functions odb: get rid of `the_repository` when handling alternates odb: get rid of `the_repository` in `odb_mkstemp()` odb: get rid of `the_repository` in `assert_oid_type()` odb: get rid of `the_repository` in `find_odb()` odb: introduce parent pointers object-store: rename files to "odb.{c,h}" object-store: rename `object_directory` to `odb_source` object-store: rename `raw_object_store` to `object_database`
Diffstat (limited to 'submodule-config.c')
-rw-r--r--submodule-config.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/submodule-config.c b/submodule-config.c
index d64438b2a1..70324da383 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -13,7 +13,7 @@
#include "submodule.h"
#include "strbuf.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "parse-options.h"
#include "thread-utils.h"
#include "tree-walk.h"
@@ -731,8 +731,8 @@ static const struct submodule *config_from(struct submodule_cache *cache,
if (submodule)
goto out;
- config = repo_read_object_file(the_repository, &oid, &type,
- &config_size);
+ config = odb_read_object(the_repository->objects, &oid,
+ &type, &config_size);
if (!config || type != OBJ_BLOB)
goto out;
@@ -798,7 +798,8 @@ static void config_from_gitmodules(config_fn_t fn, struct repository *repo, void
repo_get_oid(repo, GITMODULES_HEAD, &oid) >= 0) {
config_source.blob = oidstr = xstrdup(oid_to_hex(&oid));
if (repo != the_repository)
- add_submodule_odb_by_path(repo->objects->odb->path);
+ odb_add_submodule_source_by_path(the_repository->objects,
+ repo->objects->sources->path);
} else {
goto out;
}