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 "midx.h"
|
||||
#include "packfile.h"
|
||||
#include "prune-packed.h"
|
||||
#include "object-store.h"
|
||||
#include "odb.h"
|
||||
#include "promisor-remote.h"
|
||||
#include "shallow.h"
|
||||
#include "pack.h"
|
||||
@@ -710,7 +710,7 @@ static int midx_snapshot_ref_one(const char *refname UNUSED,
|
||||
if (oidset_insert(&data->seen, oid))
|
||||
return 0; /* already seen */
|
||||
|
||||
if (oid_object_info(the_repository, oid, NULL) != OBJ_COMMIT)
|
||||
if (odb_read_object_info(the_repository->objects, oid, NULL) != OBJ_COMMIT)
|
||||
return 0;
|
||||
|
||||
fprintf(data->f->fp, "%s%s\n", data->preferred ? "+" : "",
|
||||
@@ -1261,7 +1261,8 @@ int cmd_repack(int argc,
|
||||
if (write_bitmaps && !(pack_everything & ALL_INTO_ONE) && !write_midx)
|
||||
die(_(incremental_bitmap_conflict_error));
|
||||
|
||||
if (write_bitmaps && po_args.local && has_alt_odb(the_repository)) {
|
||||
if (write_bitmaps && po_args.local &&
|
||||
odb_has_alternates(the_repository->objects)) {
|
||||
/*
|
||||
* When asked to do a local repack, but we have
|
||||
* packfiles that are inherited from an alternate, then
|
||||
|
||||
Reference in New Issue
Block a user