mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
odb: rename oid_object_info()
Rename `oid_object_info()` to `odb_read_object_info()` as well as their `_extended()` variant to match other functions related to the object database and our modern coding guidelines. Introduce compatibility wrappers so that any in-flight topics will continue to compile. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
16cf749496
commit
e989dd96b8
@@ -251,7 +251,7 @@ static int disambiguate_commit_only(struct repository *r,
|
||||
const struct object_id *oid,
|
||||
void *cb_data UNUSED)
|
||||
{
|
||||
int kind = oid_object_info(r, oid, NULL);
|
||||
int kind = odb_read_object_info(r->objects, oid, NULL);
|
||||
return kind == OBJ_COMMIT;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ static int disambiguate_committish_only(struct repository *r,
|
||||
struct object *obj;
|
||||
int kind;
|
||||
|
||||
kind = oid_object_info(r, oid, NULL);
|
||||
kind = odb_read_object_info(r->objects, oid, NULL);
|
||||
if (kind == OBJ_COMMIT)
|
||||
return 1;
|
||||
if (kind != OBJ_TAG)
|
||||
@@ -279,7 +279,7 @@ static int disambiguate_tree_only(struct repository *r,
|
||||
const struct object_id *oid,
|
||||
void *cb_data UNUSED)
|
||||
{
|
||||
int kind = oid_object_info(r, oid, NULL);
|
||||
int kind = odb_read_object_info(r->objects, oid, NULL);
|
||||
return kind == OBJ_TREE;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ static int disambiguate_treeish_only(struct repository *r,
|
||||
struct object *obj;
|
||||
int kind;
|
||||
|
||||
kind = oid_object_info(r, oid, NULL);
|
||||
kind = odb_read_object_info(r->objects, oid, NULL);
|
||||
if (kind == OBJ_TREE || kind == OBJ_COMMIT)
|
||||
return 1;
|
||||
if (kind != OBJ_TAG)
|
||||
@@ -307,7 +307,7 @@ static int disambiguate_blob_only(struct repository *r,
|
||||
const struct object_id *oid,
|
||||
void *cb_data UNUSED)
|
||||
{
|
||||
int kind = oid_object_info(r, oid, NULL);
|
||||
int kind = odb_read_object_info(r->objects, oid, NULL);
|
||||
return kind == OBJ_BLOB;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
|
||||
return 0;
|
||||
|
||||
hash = repo_find_unique_abbrev(ds->repo, oid, DEFAULT_ABBREV);
|
||||
type = oid_object_info(ds->repo, oid, NULL);
|
||||
type = odb_read_object_info(ds->repo->objects, oid, NULL);
|
||||
|
||||
if (type < 0) {
|
||||
/*
|
||||
@@ -514,8 +514,8 @@ static int sort_ambiguous(const void *va, const void *vb, void *ctx)
|
||||
{
|
||||
struct repository *sort_ambiguous_repo = ctx;
|
||||
const struct object_id *a = va, *b = vb;
|
||||
int a_type = oid_object_info(sort_ambiguous_repo, a, NULL);
|
||||
int b_type = oid_object_info(sort_ambiguous_repo, b, NULL);
|
||||
int a_type = odb_read_object_info(sort_ambiguous_repo->objects, a, NULL);
|
||||
int b_type = odb_read_object_info(sort_ambiguous_repo->objects, b, NULL);
|
||||
int a_type_sort;
|
||||
int b_type_sort;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user