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`
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "packfile.h"
|
||||
#include "repository.h"
|
||||
#include "trace2.h"
|
||||
#include "object-store.h"
|
||||
#include "odb.h"
|
||||
#include "list-objects-filter-options.h"
|
||||
#include "midx.h"
|
||||
#include "config.h"
|
||||
@@ -1868,8 +1868,8 @@ static unsigned long get_size_by_pos(struct bitmap_index *bitmap_git,
|
||||
size_t eindex_pos = pos - bitmap_num_objects_total(bitmap_git);
|
||||
struct eindex *eindex = &bitmap_git->ext_index;
|
||||
struct object *obj = eindex->objects[eindex_pos];
|
||||
if (oid_object_info_extended(bitmap_repo(bitmap_git), &obj->oid,
|
||||
&oi, 0) < 0)
|
||||
if (odb_read_object_info_extended(bitmap_repo(bitmap_git)->objects, &obj->oid,
|
||||
&oi, 0) < 0)
|
||||
die(_("unable to get size of %s"), oid_to_hex(&obj->oid));
|
||||
}
|
||||
|
||||
@@ -3220,8 +3220,8 @@ static off_t get_disk_usage_for_extended(struct bitmap_index *bitmap_git)
|
||||
i)))
|
||||
continue;
|
||||
|
||||
if (oid_object_info_extended(bitmap_repo(bitmap_git), &obj->oid,
|
||||
&oi, 0) < 0)
|
||||
if (odb_read_object_info_extended(bitmap_repo(bitmap_git)->objects,
|
||||
&obj->oid, &oi, 0) < 0)
|
||||
die(_("unable to get disk usage of '%s'"),
|
||||
oid_to_hex(&obj->oid));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user