summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:19 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-08 15:12:57 +0900
commitd3101b533d365825f52d8e5e52328702acbc8e3a (patch)
tree22062fd7fd5ed77e4977a3ee6de3ce91c65eb3d7 /tag.c
parentlog-tree: convert to struct object_id (diff)
downloadtgif-d3101b533d365825f52d8e5e52328702acbc8e3a.tar.xz
Convert lookup_tag to struct object_id
Convert lookup_tag to take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tag.c b/tag.c
index 062516b405..571798519f 100644
--- a/tag.c
+++ b/tag.c
@@ -89,11 +89,11 @@ struct object *deref_tag_noverify(struct object *o)
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);
}
@@ -148,7 +148,7 @@ int parse_tag_buffer(struct tag *item, const void *data, unsigned long size)
} else if (!strcmp(type, commit_type)) {
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;