| 99 | } |
| 100 | |
| 101 | struct commit *lookup_commit(struct repository *r, const struct object_id *oid) |
| 102 | { |
| 103 | struct object *obj = lookup_object(r, oid); |
| 104 | if (!obj) |
| 105 | return create_object(r, oid, alloc_commit_node(r)); |
| 106 | return object_as_type(obj, OBJ_COMMIT, 0); |
| 107 | } |
| 108 | |
| 109 | struct commit *lookup_commit_reference_by_name(const char *name) |
| 110 | { |