aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-12-28 10:40:58 -0800
committerJunio C Hamano <gitster@pobox.com>2018-12-28 10:40:58 -0800
commitb9fbc04e26fcc2c7ba6dda32512b3726d31e4beb (patch)
treed160a4832769b9f4733c8ecaf93e7eb565a37b2a /object.c
parentGit 2.20 (diff)
parentt/helper/test-repository: celebrate independence from the_repository (diff)
downloadgit-b9fbc04e26fcc2c7ba6dda32512b3726d31e4beb.tar.gz
git-b9fbc04e26fcc2c7ba6dda32512b3726d31e4beb.zip
Merge branch 'sb/more-repo-in-api' into md/list-objects-filter-by-depth
Diffstat (limited to 'object.c')
-rw-r--r--object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/object.c b/object.c
index e54160550c..c4170d2d0c 100644
--- a/object.c
+++ b/object.c
@@ -259,8 +259,8 @@ struct object *parse_object(struct repository *r, const struct object_id *oid)
if (obj && obj->parsed)
return obj;
- if ((obj && obj->type == OBJ_BLOB && has_object_file(oid)) ||
- (!obj && has_object_file(oid) &&
+ if ((obj && obj->type == OBJ_BLOB && repo_has_object_file(r, oid)) ||
+ (!obj && repo_has_object_file(r, oid) &&
oid_object_info(r, oid, NULL) == OBJ_BLOB)) {
if (check_object_signature(repl, NULL, 0, NULL) < 0) {
error(_("sha1 mismatch %s"), oid_to_hex(oid));
@@ -270,7 +270,7 @@ struct object *parse_object(struct repository *r, const struct object_id *oid)
return lookup_object(r, oid->hash);
}
- buffer = read_object_file(oid, &type, &size);
+ buffer = repo_read_object_file(r, oid, &type, &size);
if (buffer) {
if (check_object_signature(repl, buffer, size, type_name(type)) < 0) {
free(buffer);
@@ -540,7 +540,7 @@ void parsed_object_pool_clear(struct parsed_object_pool *o)
if (obj->type == OBJ_TREE)
free_tree_buffer((struct tree*)obj);
else if (obj->type == OBJ_COMMIT)
- release_commit_memory((struct commit*)obj);
+ release_commit_memory(o, (struct commit*)obj);
else if (obj->type == OBJ_TAG)
release_tag_memory((struct tag*)obj);
}