| 485 | } |
| 486 | |
| 487 | static int write_midx_bitmapped_packs(struct hashfile *f, void *data) |
| 488 | { |
| 489 | struct write_midx_context *ctx = data; |
| 490 | size_t i; |
| 491 | |
| 492 | for (i = 0; i < ctx->nr; i++) { |
| 493 | struct pack_info *pack = &ctx->info[i]; |
| 494 | if (pack->expired) |
| 495 | continue; |
| 496 | |
| 497 | if (pack->bitmap_pos == BITMAP_POS_UNKNOWN && pack->bitmap_nr) |
| 498 | BUG("pack '%s' has no bitmap position, but has %d bitmapped object(s)", |
| 499 | pack->pack_name, pack->bitmap_nr); |
| 500 | |
| 501 | hashwrite_be32(f, pack->bitmap_pos); |
| 502 | hashwrite_be32(f, pack->bitmap_nr); |
| 503 | } |
| 504 | return 0; |
| 505 | } |
| 506 | |
| 507 | static int write_midx_oid_fanout(struct hashfile *f, |
| 508 | void *data) |
nothing calls this directly
no test coverage detected