| 204 | } |
| 205 | |
| 206 | int parse_tag(struct repository *r, struct tag *item) |
| 207 | { |
| 208 | enum object_type type; |
| 209 | void *data; |
| 210 | size_t size; |
| 211 | int ret; |
| 212 | |
| 213 | if (item->object.parsed) |
| 214 | return 0; |
| 215 | data = odb_read_object(r->objects, &item->object.oid, &type, &size); |
| 216 | if (!data) |
| 217 | return error("Could not read %s", |
| 218 | oid_to_hex(&item->object.oid)); |
| 219 | if (type != OBJ_TAG) { |
| 220 | free(data); |
| 221 | return error("Object %s not a tag", |
| 222 | oid_to_hex(&item->object.oid)); |
| 223 | } |
| 224 | ret = parse_tag_buffer(r, item, data, size); |
| 225 | free(data); |
| 226 | return ret; |
| 227 | } |
| 228 | |
| 229 | struct object_id *get_tagged_oid(struct tag *tag) |
| 230 | { |
no test coverage detected