| 703 | } |
| 704 | |
| 705 | static 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 | |
| 732 | static void prepare_midx_packing_data(struct packing_data *pdata, |
| 733 | struct write_midx_context *ctx) |
no test coverage detected