MCPcopy Create free account
hub / github.com/git/git / get_object_list_from_bitmap

Function get_object_list_from_bitmap

builtin/pack-objects.c:4663–4697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4661}
4662
4663static int get_object_list_from_bitmap(struct rev_info *revs)
4664{
4665 if (!(bitmap_git = prepare_bitmap_walk(revs, 0)))
4666 return -1;
4667
4668 /*
4669 * For now, force the name-hash version to be 1 since that
4670 * is the version implied by the bitmap format. Later, the
4671 * format can include this version explicitly in its format,
4672 * allowing readers to know the version that was used during
4673 * the bitmap write.
4674 */
4675 name_hash_version = 1;
4676
4677 if (pack_options_allow_reuse())
4678 reuse_partial_packfile_from_bitmap(bitmap_git,
4679 &reuse_packfiles,
4680 &reuse_packfiles_nr,
4681 &reuse_packfile_bitmap,
4682 allow_pack_reuse == MULTI_PACK_REUSE);
4683
4684 if (reuse_packfiles) {
4685 reuse_packfile_objects = bitmap_popcount(reuse_packfile_bitmap);
4686 if (!reuse_packfile_objects)
4687 BUG("expected non-empty reuse bitmap");
4688
4689 nr_result += reuse_packfile_objects;
4690 nr_seen += reuse_packfile_objects;
4691 display_progress(progress_state, nr_seen);
4692 }
4693
4694 traverse_bitmap_commit_list(bitmap_git, revs,
4695 &add_object_entry_from_bitmap);
4696 return 0;
4697}
4698
4699static void record_recent_object(struct object *obj,
4700 const char *name UNUSED,

Callers 1

get_object_listFunction · 0.85

Calls 6

prepare_bitmap_walkFunction · 0.85
pack_options_allow_reuseFunction · 0.85
bitmap_popcountFunction · 0.85
display_progressFunction · 0.85

Tested by

no test coverage detected