MCPcopy Create free account
hub / github.com/git/git / done_pbase_path_pos

Function done_pbase_path_pos

builtin/pack-objects.c:2070–2084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2068static int done_pbase_paths_num;
2069static int done_pbase_paths_alloc;
2070static int done_pbase_path_pos(unsigned hash)
2071{
2072 int lo = 0;
2073 int hi = done_pbase_paths_num;
2074 while (lo < hi) {
2075 int mi = lo + (hi - lo) / 2;
2076 if (done_pbase_paths[mi] == hash)
2077 return mi;
2078 if (done_pbase_paths[mi] < hash)
2079 hi = mi;
2080 else
2081 lo = mi + 1;
2082 }
2083 return -lo-1;
2084}
2085
2086static int check_pbase_path(unsigned hash)
2087{

Callers 1

check_pbase_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected