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

Function search_commit_pos_in_graph

commit-graph.c:984–998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

982}
983
984static 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
1000static int find_commit_pos_in_graph(struct commit *item, struct commit_graph *g, uint32_t *pos)
1001{

Callers 2

find_commit_pos_in_graphFunction · 0.85
lookup_commit_in_graphFunction · 0.85

Calls 1

bsearch_graphFunction · 0.85

Tested by

no test coverage detected