diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-03-22 17:40:09 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-22 18:00:07 (GMT) |
commit | 3d475f46a8225a9cc549ac5cb2c51d6ecd9e0f7c (patch) | |
tree | 09459e67cb30070c566ceebc78d6a2b26547dc66 /sha1_name.c | |
parent | 626fd982a3ead1b0aae26c242fbabaaaaf4b6062 (diff) | |
download | git-3d475f46a8225a9cc549ac5cb2c51d6ecd9e0f7c.zip git-3d475f46a8225a9cc549ac5cb2c51d6ecd9e0f7c.tar.gz git-3d475f46a8225a9cc549ac5cb2c51d6ecd9e0f7c.tar.bz2 |
packfile: define and use bsearch_pack()
The method bsearch_hash() generalizes binary searches using a
fanout table. The only consumer is currently find_pack_entry_one().
It requires a bit of pointer arithmetic to align the fanout table
and the lookup table depending on the pack-index version.
Extract the pack-index pointer arithmetic to a new method,
bsearch_pack(), so this can be re-used in other code paths.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
0 files changed, 0 insertions, 0 deletions