return o;
}
-struct tag *lookup_tag(const unsigned char *sha1)
+struct tag *lookup_tag(const struct object_id *oid)
{
- struct object *obj = lookup_object(sha1);
+ struct object *obj = lookup_object(oid->hash);
if (!obj)
- return create_object(sha1, alloc_tag_node());
+ return create_object(oid->hash, alloc_tag_node());
return object_as_type(obj, OBJ_TAG, 0);
}
bufptr = nl + 1;
if (!strcmp(type, blob_type)) {
- item->tagged = &lookup_blob(oid.hash)->object;
+ item->tagged = &lookup_blob(&oid)->object;
} else if (!strcmp(type, tree_type)) {
- item->tagged = &lookup_tree(oid.hash)->object;
+ item->tagged = &lookup_tree(&oid)->object;
} else if (!strcmp(type, commit_type)) {
- item->tagged = &lookup_commit(oid.hash)->object;
+ item->tagged = &lookup_commit(&oid)->object;
} else if (!strcmp(type, tag_type)) {
- item->tagged = &lookup_tag(oid.hash)->object;
+ item->tagged = &lookup_tag(&oid)->object;
} else {
error("Unknown type %s", type);
item->tagged = NULL;