| 859 | } |
| 860 | |
| 861 | static 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 | |
| 879 | static void fill_commit_graph_info(struct commit *item, struct commit_graph *g, uint32_t pos) |
| 880 | { |
no test coverage detected