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

Function prepare_midx_packing_data

midx-write.c:732–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732static void prepare_midx_packing_data(struct packing_data *pdata,
733 struct write_midx_context *ctx)
734{
735 uint32_t i;
736
737 trace2_region_enter("midx", "prepare_midx_packing_data", ctx->repo);
738
739 memset(pdata, 0, sizeof(struct packing_data));
740 prepare_packing_data(ctx->repo, pdata);
741
742 for (i = 0; i < ctx->entries_nr; i++) {
743 uint32_t pos = ctx->pack_order[i];
744 struct pack_midx_entry *from = &ctx->entries[pos];
745 struct object_entry *to = packlist_alloc(pdata, &from->oid);
746
747 oe_set_in_pack(pdata, to,
748 ctx->info[midx_pack_perm(ctx, from->pack_int_id)].p);
749 }
750
751 trace2_region_leave("midx", "prepare_midx_packing_data", ctx->repo);
752}
753
754static int add_ref_to_pending(const struct reference *ref, void *cb_data)
755{

Callers 1

write_midx_internalFunction · 0.85

Calls 4

prepare_packing_dataFunction · 0.85
packlist_allocFunction · 0.85
oe_set_in_packFunction · 0.85
midx_pack_permFunction · 0.85

Tested by

no test coverage detected