summaryrefslogtreecommitdiff
path: root/sha1-name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:16 (GMT)
commitfcb6df325468a7ae12949ab80dcd37772b9b1fbf (patch)
tree7ae13a8a1c4f7b417403b6f7f64f34a9565dbab2 /sha1-name.c
parentd0f7b22b5bf0847a6e0fe039feb598819dffab4c (diff)
parent9d98354f48997faf8251c566d909957f6ae427d5 (diff)
downloadgit-fcb6df325468a7ae12949ab80dcd37772b9b1fbf.zip
git-fcb6df325468a7ae12949ab80dcd37772b9b1fbf.tar.gz
git-fcb6df325468a7ae12949ab80dcd37772b9b1fbf.tar.bz2
Merge branch 'sb/oid-object-info'
The codepath around object-info API has been taught to take the repository object (which in turn tells the API which object store the objects are to be located). * sb/oid-object-info: cache.h: allow oid_object_info to handle arbitrary repositories packfile: add repository argument to cache_or_unpack_entry packfile: add repository argument to unpack_entry packfile: add repository argument to read_object packfile: add repository argument to packed_object_info packfile: add repository argument to packed_to_object_type packfile: add repository argument to retry_bad_packed_offset cache.h: add repository argument to oid_object_info cache.h: add repository argument to oid_object_info_extended
Diffstat (limited to 'sha1-name.c')
-rw-r--r--sha1-name.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sha1-name.c b/sha1-name.c
index bd99fd8..80030b1 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -223,7 +223,7 @@ static int finish_object_disambiguation(struct disambiguate_state *ds,
static int disambiguate_commit_only(const struct object_id *oid, void *cb_data_unused)
{
- int kind = oid_object_info(oid, NULL);
+ int kind = oid_object_info(the_repository, oid, NULL);
return kind == OBJ_COMMIT;
}
@@ -232,7 +232,7 @@ static int disambiguate_committish_only(const struct object_id *oid, void *cb_da
struct object *obj;
int kind;
- kind = oid_object_info(oid, NULL);
+ kind = oid_object_info(the_repository, oid, NULL);
if (kind == OBJ_COMMIT)
return 1;
if (kind != OBJ_TAG)
@@ -247,7 +247,7 @@ static int disambiguate_committish_only(const struct object_id *oid, void *cb_da
static int disambiguate_tree_only(const struct object_id *oid, void *cb_data_unused)
{
- int kind = oid_object_info(oid, NULL);
+ int kind = oid_object_info(the_repository, oid, NULL);
return kind == OBJ_TREE;
}
@@ -256,7 +256,7 @@ static int disambiguate_treeish_only(const struct object_id *oid, void *cb_data_
struct object *obj;
int kind;
- kind = oid_object_info(oid, NULL);
+ kind = oid_object_info(the_repository, oid, NULL);
if (kind == OBJ_TREE || kind == OBJ_COMMIT)
return 1;
if (kind != OBJ_TAG)
@@ -271,7 +271,7 @@ static int disambiguate_treeish_only(const struct object_id *oid, void *cb_data_
static int disambiguate_blob_only(const struct object_id *oid, void *cb_data_unused)
{
- int kind = oid_object_info(oid, NULL);
+ int kind = oid_object_info(the_repository, oid, NULL);
return kind == OBJ_BLOB;
}
@@ -350,7 +350,7 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
if (ds->fn && !ds->fn(oid, ds->cb_data))
return 0;
- type = oid_object_info(oid, NULL);
+ type = oid_object_info(the_repository, oid, NULL);
if (type == OBJ_COMMIT) {
struct commit *commit = lookup_commit(oid);
if (commit) {