diff options
author | Taylor Blau <me@ttaylorr.com> | 2023-07-10 17:12:25 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-10 14:48:55 -0700 |
commit | d22d941ac08aa31266bb0b38d78c79c3ffdc4f86 (patch) | |
tree | 6a49408e7aa9f94c0cf20bdfb9aae5c5949c4702 /commit-graph.c | |
parent | b269ac53c07aa46d5a88d05dac8216d189e69a50 (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