Remove get_object_hash.

Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object.  This provides no
functional change, as it is essentially a macro substitution.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
brian m. carlson
2015-11-10 02:22:29 +00:00
committed by Jeff King
parent f2fd0760f6
commit ed1c9977cb
63 changed files with 251 additions and 253 deletions

6
fsck.c
View File

@ -276,7 +276,7 @@ static int report(struct fsck_options *options, struct object *object,
return 0;
if (options->skiplist && object &&
sha1_array_lookup(options->skiplist, get_object_hash(*object)) >= 0)
sha1_array_lookup(options->skiplist, object->oid.hash) >= 0)
return 0;
if (msg_type == FSCK_FATAL)
@ -630,7 +630,7 @@ static int fsck_commit_buffer(struct commit *commit, const char *buffer,
buffer += 41;
parent_line_count++;
}
graft = lookup_commit_graft(get_object_hash(commit->object));
graft = lookup_commit_graft(commit->object.oid.hash);
parent_count = commit_list_count(commit->parents);
if (graft) {
if (graft->nr_parent == -1 && !parent_count)
@ -696,7 +696,7 @@ static int fsck_tag_buffer(struct tag *tag, const char *data,
enum object_type type;
buffer = to_free =
read_sha1_file(get_object_hash(tag->object), &type, &size);
read_sha1_file(tag->object.oid.hash, &type, &size);
if (!buffer)
return report(options, &tag->object,
FSCK_MSG_MISSING_TAG_OBJECT,