| 982 | } |
| 983 | |
| 984 | static int search_commit_pos_in_graph(const struct object_id *id, struct commit_graph *g, uint32_t *pos) |
| 985 | { |
| 986 | struct commit_graph *cur_g = g; |
| 987 | uint32_t lex_index; |
| 988 | |
| 989 | while (cur_g && !bsearch_graph(cur_g, id, &lex_index)) |
| 990 | cur_g = cur_g->base_graph; |
| 991 | |
| 992 | if (cur_g) { |
| 993 | *pos = lex_index + cur_g->num_commits_in_base; |
| 994 | return 1; |
| 995 | } |
| 996 | |
| 997 | return 0; |
| 998 | } |
| 999 | |
| 1000 | static int find_commit_pos_in_graph(struct commit *item, struct commit_graph *g, uint32_t *pos) |
| 1001 | { |
no test coverage detected