path: root/builtin
diff options
authorJeff King <>2020-02-14 18:22:29 (GMT)
committerJunio C Hamano <>2020-02-14 18:46:22 (GMT)
commit6663ae0a0818aba5d4de289b1a37e1961ad6c367 (patch)
tree408ed5d15e418684930628fcd4e5346cdd4b55b7 /builtin
parent4eb707ebd681eb85306071db33ed70186d1642ac (diff)
pack-bitmap: basic noop bitmap filter infrastructure
Currently you can't use object filters with bitmaps, but we plan to support at least some filters with bitmaps. Let's introduce some infrastructure that will help us do that: - prepare_bitmap_walk() now accepts a list_objects_filter_options parameter (which can be NULL for no filtering; all the current callers pass this) - we'll bail early if the filter is incompatible with bitmaps (just as we would if there were no bitmaps at all). Currently all filters are incompatible. - we'll filter the resulting bitmap; since there are no supported filters yet, this is always a noop. There should be no behavior change yet, but we'll support some actual filters in a future patch. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin')
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 06915eb..2bb81c2 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -3040,7 +3040,7 @@ static int pack_options_allow_reuse(void)
static int get_object_list_from_bitmap(struct rev_info *revs)
- if (!(bitmap_git = prepare_bitmap_walk(revs)))
+ if (!(bitmap_git = prepare_bitmap_walk(revs, NULL)))
return -1;
if (pack_options_allow_reuse() &&
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 937324c..6ff5e17 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -407,7 +407,7 @@ static int try_bitmap_count(struct rev_info *revs)
max_count = revs->max_count;
- bitmap_git = prepare_bitmap_walk(revs);
+ bitmap_git = prepare_bitmap_walk(revs, NULL);
if (!bitmap_git)
return -1;
@@ -434,7 +434,7 @@ static int try_bitmap_traversal(struct rev_info *revs)
if (revs->max_count >= 0)
return -1;
- bitmap_git = prepare_bitmap_walk(revs);
+ bitmap_git = prepare_bitmap_walk(revs, NULL);
if (!bitmap_git)
return -1;