MCPcopy Index your code
hub / github.com/git/git / test_bitmap_commits

Function test_bitmap_commits

pack-bitmap.c:2862–2888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2860}
2861
2862int 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
2890int test_bitmap_commits_with_offset(struct repository *r)
2891{

Callers 1

bitmap_list_commitsFunction · 0.85

Calls 6

prepare_bitmap_gitFunction · 0.85
load_bitmap_entries_v1Function · 0.85
printf_lnFunction · 0.85
oid_to_hexFunction · 0.85
free_bitmap_indexFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected