]> git.ipfire.org Git - thirdparty/git.git/commit - pack-bitmap.c
pack-bitmap.c: introduce 'bitmap_is_preferred_refname()'
authorTaylor Blau <me@ttaylorr.com>
Tue, 31 Aug 2021 20:52:16 +0000 (16:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Sep 2021 20:56:43 +0000 (13:56 -0700)
commit711260fd60366063e8c5253a83fc4aeb8947dc9d
tree43fa6a5f9983878ed42f171ec116db366deb10bd
parent6b4277e697a45db1fb266da1c9df6641aecc4902
pack-bitmap.c: introduce 'bitmap_is_preferred_refname()'

In a recent commit, pack-objects learned support for the
'pack.preferBitmapTips' configuration. This patch prepares the
multi-pack bitmap code to respect this configuration, too.

The yet-to-be implemented code will find that it is more efficient to
check whether each reference contains a prefix found in the configured
set of values rather than doing an additional traversal.

Implement a function 'bitmap_is_preferred_refname()' which will perform
that check. Its caller will be added in a subsequent patch.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap.c
pack-bitmap.h