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

Function writer_dump_object_index

reftable/writer.c:682–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682static int writer_dump_object_index(struct reftable_writer *w)
683{
684 struct write_record_arg closure = { .w = w };
685 struct common_prefix_arg common = {
686 .max = 1, /* obj_id_len should be >= 2. */
687 };
688 int err;
689
690 if (w->obj_index_tree)
691 infix_walk(w->obj_index_tree, &update_common, &common);
692 w->stats.object_id_len = common.max + 1;
693
694 err = writer_reinit_block_writer(w, REFTABLE_BLOCK_TYPE_OBJ);
695 if (err < 0)
696 return err;
697
698 if (w->obj_index_tree)
699 infix_walk(w->obj_index_tree, &write_object_record, &closure);
700
701 if (closure.err < 0)
702 return closure.err;
703 return writer_finish_section(w);
704}
705
706static int writer_finish_public_section(struct reftable_writer *w)
707{

Callers 1

Calls 3

infix_walkFunction · 0.85
writer_finish_sectionFunction · 0.85

Tested by

no test coverage detected