| 1092 | } |
| 1093 | |
| 1094 | static struct tree *load_tree_for_commit(struct commit_graph *g, |
| 1095 | struct commit *c) |
| 1096 | { |
| 1097 | struct object_id oid; |
| 1098 | const unsigned char *commit_data; |
| 1099 | uint32_t graph_pos = commit_graph_position(c); |
| 1100 | |
| 1101 | while (graph_pos < g->num_commits_in_base) |
| 1102 | g = g->base_graph; |
| 1103 | |
| 1104 | commit_data = g->chunk_commit_data + |
| 1105 | st_mult(graph_data_width(g->hash_algo), |
| 1106 | graph_pos - g->num_commits_in_base); |
| 1107 | |
| 1108 | oidread(&oid, commit_data, g->hash_algo); |
| 1109 | set_commit_tree(c, lookup_tree(g->odb_source->odb->repo, &oid)); |
| 1110 | |
| 1111 | return c->maybe_tree; |
| 1112 | } |
| 1113 | |
| 1114 | static struct tree *get_commit_tree_in_graph_one(struct commit_graph *g, |
| 1115 | const struct commit *c) |
no test coverage detected