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

Function insert_parent_or_die

commit-graph.c:861–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861static struct commit_list **insert_parent_or_die(struct commit_graph *g,
862 uint32_t pos,
863 struct commit_list **pptr)
864{
865 struct commit *c;
866 struct object_id oid;
867
868 if (pos >= g->num_commits + g->num_commits_in_base)
869 die("invalid parent position %"PRIu32, pos);
870
871 load_oid_from_graph(g, pos, &oid);
872 c = lookup_commit(g->odb_source->odb->repo, &oid);
873 if (!c)
874 die(_("could not find commit %s"), oid_to_hex(&oid));
875 commit_graph_data_at(c)->graph_pos = pos;
876 return &commit_list_insert(c, pptr)->next;
877}
878
879static void fill_commit_graph_info(struct commit *item, struct commit_graph *g, uint32_t pos)
880{

Callers 1

fill_commit_in_graphFunction · 0.85

Calls 6

load_oid_from_graphFunction · 0.85
lookup_commitFunction · 0.85
oid_to_hexFunction · 0.85
commit_graph_data_atFunction · 0.85
commit_list_insertFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected