summaryrefslogtreecommitdiff
path: root/pack-bitmap.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-08-31 20:52:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-01 20:56:43 (GMT)
commit711260fd60366063e8c5253a83fc4aeb8947dc9d (patch)
tree43fa6a5f9983878ed42f171ec116db366deb10bd /pack-bitmap.h
parent6b4277e697a45db1fb266da1c9df6641aecc4902 (diff)
downloadgit-711260fd60366063e8c5253a83fc4aeb8947dc9d.zip
git-711260fd60366063e8c5253a83fc4aeb8947dc9d.tar.gz
git-711260fd60366063e8c5253a83fc4aeb8947dc9d.tar.bz2
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>
Diffstat (limited to 'pack-bitmap.h')
-rw-r--r--pack-bitmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pack-bitmap.h b/pack-bitmap.h
index 020cd8d..52ea10d 100644
--- a/pack-bitmap.h
+++ b/pack-bitmap.h
@@ -94,5 +94,6 @@ void bitmap_writer_finish(struct pack_idx_entry **index,
uint16_t options);
const struct string_list *bitmap_preferred_tips(struct repository *r);
+int bitmap_is_preferred_refname(struct repository *r, const char *refname);
#endif