summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2021-08-09 10:11:59 +0200
committerJunio C Hamano <gitster@pobox.com>2021-08-09 09:51:12 -0700
commit809ea28f809e52d3204b597637b2f5e072c140f8 (patch)
treeb80ce320ea84d371b686cfc331d4415f03bfe0d4 /revision.c
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 'revision.c')
0 files changed, 0 insertions, 0 deletions