| 79 | } |
| 80 | |
| 81 | struct commit *lookup_commit_or_die(const struct object_id *oid, const char *ref_name) |
| 82 | { |
| 83 | struct commit *c = lookup_commit_reference(the_repository, oid); |
| 84 | if (!c) |
| 85 | die(_("could not parse %s"), ref_name); |
| 86 | if (!oideq(oid, &c->object.oid)) { |
| 87 | warning(_("%s %s is not a commit!"), |
| 88 | ref_name, oid_to_hex(oid)); |
| 89 | } |
| 90 | return c; |
| 91 | } |
| 92 | |
| 93 | struct commit *lookup_commit_object(struct repository *r, |
| 94 | const struct object_id *oid) |
no test coverage detected