| 84 | } |
| 85 | |
| 86 | void *fill_tree_descriptor(struct repository *r, |
| 87 | struct tree_desc *desc, |
| 88 | const struct object_id *oid) |
| 89 | { |
| 90 | size_t size = 0; |
| 91 | void *buf = NULL; |
| 92 | |
| 93 | if (oid) { |
| 94 | buf = odb_read_object_peeled(r->objects, oid, OBJ_TREE, &size, NULL); |
| 95 | if (!buf) |
| 96 | die(_("unable to read tree (%s)"), oid_to_hex(oid)); |
| 97 | } |
| 98 | init_tree_desc(desc, oid, buf, size); |
| 99 | return buf; |
| 100 | } |
| 101 | |
| 102 | static void entry_clear(struct name_entry *a) |
| 103 | { |
no test coverage detected