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 | refs: plumb `exclude_patterns` argument throughout (diff) | |
| download | git-d22d941ac08aa31266bb0b38d78c79c3ffdc4f86.tar.gz git-d22d941ac08aa31266bb0b38d78c79c3ffdc4f86.zip | |
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
