diff options
-rw-r--r-- | pack-bitmap.c | 18 | ||||
-rw-r--r-- | pack-bitmap.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c index 1ebe0c8162..7554510b14 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -1350,6 +1350,24 @@ void test_bitmap_walk(struct rev_info *revs) free_bitmap_index(bitmap_git); } +int test_bitmap_commits(struct repository *r) +{ + struct bitmap_index *bitmap_git = prepare_bitmap_git(r); + struct object_id oid; + MAYBE_UNUSED void *value; + + if (!bitmap_git) + die("failed to load bitmap indexes"); + + kh_foreach(bitmap_git->bitmaps, oid, value, { + printf("%s\n", oid_to_hex(&oid)); + }); + + free_bitmap_index(bitmap_git); + + return 0; +} + int rebuild_bitmap(const uint32_t *reposition, struct ewah_bitmap *source, struct bitmap *dest) diff --git a/pack-bitmap.h b/pack-bitmap.h index 36d99930d8..c3cdd80756 100644 --- a/pack-bitmap.h +++ b/pack-bitmap.h @@ -49,6 +49,7 @@ void traverse_bitmap_commit_list(struct bitmap_index *, struct rev_info *revs, show_reachable_fn show_reachable); void test_bitmap_walk(struct rev_info *revs); +int test_bitmap_commits(struct repository *r); struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs, struct list_objects_filter_options *filter); int reuse_partial_packfile_from_bitmap(struct bitmap_index *, |