MCPcopy Index your code
hub / github.com/git/git / lookup_commit_or_die

Function lookup_commit_or_die

commit.c:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81struct 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
93struct commit *lookup_commit_object(struct repository *r,
94 const struct object_id *oid)

Callers 11

fmt_merge_msgFunction · 0.85
verify_merge_baseFunction · 0.85
prepare_show_mergeFunction · 0.85
write_index_patchFunction · 0.85
parse_mail_rebaseFunction · 0.85
get_base_commitFunction · 0.85
cmd_rebaseFunction · 0.85
cmd_mergeFunction · 0.85
update_headFunction · 0.85
cmd_commitFunction · 0.85
commit_tree_extFunction · 0.85

Calls 5

lookup_commit_referenceFunction · 0.85
oideqFunction · 0.85
warningFunction · 0.85
oid_to_hexFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected