| 77 | } |
| 78 | |
| 79 | char *notes_cache_get(struct notes_cache *c, struct object_id *key_oid, |
| 80 | size_t *outsize) |
| 81 | { |
| 82 | const struct object_id *value_oid; |
| 83 | enum object_type type; |
| 84 | char *value; |
| 85 | size_t size; |
| 86 | |
| 87 | value_oid = get_note(&c->tree, key_oid); |
| 88 | if (!value_oid) |
| 89 | return NULL; |
| 90 | value = odb_read_object(the_repository->objects, value_oid, &type, &size); |
| 91 | |
| 92 | *outsize = size; |
| 93 | return value; |
| 94 | } |
| 95 | |
| 96 | int notes_cache_put(struct notes_cache *c, struct object_id *key_oid, |
| 97 | const char *data, size_t size) |
no test coverage detected