summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-07-10 17:12:25 -0400
committerJunio C Hamano <gitster@pobox.com>2023-07-10 14:48:55 -0700
commitd22d941ac08aa31266bb0b38d78c79c3ffdc4f86 (patch)
tree6a49408e7aa9f94c0cf20bdfb9aae5c5949c4702 /commit-graph.c
parentb269ac53c07aa46d5a88d05dac8216d189e69a50 (diff)
refs/packed-backend.c: refactor `find_reference_location()`
The function `find_reference_location()` is used to perform a binary search-like function over the contents of a repository's `$GIT_DIR/packed-refs` file. The search it implements is unlike a standard binary search in that the records it searches over are not of a fixed width, so the comparison must locate the end of a record before comparing it. Extract the core routine of `find_reference_location()` in order to implement a function in the following patch which will find the first location in the `packed-refs` file that *doesn't* match the given pattern. The behavior of `find_reference_location()` is unchanged. Co-authored-by: Jeff King <peff@peff.net> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions