| 2860 | } |
| 2861 | |
| 2862 | int test_bitmap_commits(struct repository *r) |
| 2863 | { |
| 2864 | struct object_id oid; |
| 2865 | MAYBE_UNUSED void *value; |
| 2866 | struct bitmap_index *bitmap_git = prepare_bitmap_git(r); |
| 2867 | |
| 2868 | if (!bitmap_git) |
| 2869 | die(_("failed to load bitmap indexes")); |
| 2870 | |
| 2871 | /* |
| 2872 | * Since this function needs to print the bitmapped |
| 2873 | * commits, bypass the commit lookup table (if one exists) |
| 2874 | * by forcing the bitmap to eagerly load its entries. |
| 2875 | */ |
| 2876 | if (bitmap_git->table_lookup) { |
| 2877 | if (load_bitmap_entries_v1(bitmap_git) < 0) |
| 2878 | die(_("failed to load bitmap indexes")); |
| 2879 | } |
| 2880 | |
| 2881 | kh_foreach(bitmap_git->bitmaps, oid, value, { |
| 2882 | printf_ln("%s", oid_to_hex(&oid)); |
| 2883 | }); |
| 2884 | |
| 2885 | free_bitmap_index(bitmap_git); |
| 2886 | |
| 2887 | return 0; |
| 2888 | } |
| 2889 | |
| 2890 | int test_bitmap_commits_with_offset(struct repository *r) |
| 2891 | { |
no test coverage detected