Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2021-08-09 11:11:59 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-09 19:51:12 +0300
commit809ea28f809e52d3204b597637b2f5e072c140f8 (patch)
treeb80ce320ea84d371b686cfc331d4415f03bfe0d4 /commit-graph.h
parentbf9c0cbddbcd730e4312ba5e19f8b8a2edd65bb3 (diff)
commit-graph: split out function to search commit position
The function `find_commit_in_graph()` assumes that the caller has passed an object which was already determined to be a commit given that it will access the commit's graph position, which is stored in a commit slab. In a subsequent patch, we want to search for an object ID though without knowing whether it is a commit or not, which is not currently possible. Split out the logic to search the commit graph for a given object ID to prepare for this change. This commit also renames the function to `find_commit_pos_in_graph()`, which more accurately reflects what this function does. Furthermore, in order to allow for the searched object ID to be const, we need to adjust `bsearch_graph()`'s signature to accept a constant object ID as input, too. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
0 files changed, 0 insertions, 0 deletions