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

Function write_midx_reverse_index

midx-write.c:705–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705static void write_midx_reverse_index(struct write_midx_context *ctx,
706 unsigned char *midx_hash)
707{
708 struct strbuf buf = STRBUF_INIT;
709 char *tmp_file;
710
711 trace2_region_enter("midx", "write_midx_reverse_index", ctx->repo);
712
713 if (ctx->incremental)
714 get_split_midx_filename_ext(ctx->source, &buf,
715 midx_hash, MIDX_EXT_REV);
716 else
717 get_midx_filename_ext(ctx->source, &buf,
718 midx_hash, MIDX_EXT_REV);
719
720 tmp_file = write_rev_file_order(ctx->repo, NULL, ctx->pack_order,
721 ctx->entries_nr, midx_hash, WRITE_REV);
722
723 if (finalize_object_file(ctx->repo, tmp_file, buf.buf))
724 die(_("cannot store reverse index file"));
725
726 strbuf_release(&buf);
727 free(tmp_file);
728
729 trace2_region_leave("midx", "write_midx_reverse_index", ctx->repo);
730}
731
732static void prepare_midx_packing_data(struct packing_data *pdata,
733 struct write_midx_context *ctx)

Callers 1

write_midx_internalFunction · 0.85

Calls 6

get_midx_filename_extFunction · 0.85
write_rev_file_orderFunction · 0.85
finalize_object_fileFunction · 0.85
strbuf_releaseFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected