| 608 | } |
| 609 | |
| 610 | static void get_info_packs(struct strbuf *hdr, char *arg UNUSED) |
| 611 | { |
| 612 | size_t objdirlen = strlen(repo_get_object_directory(the_repository)); |
| 613 | struct strbuf buf = STRBUF_INIT; |
| 614 | struct packed_git *p; |
| 615 | size_t cnt = 0; |
| 616 | |
| 617 | select_getanyfile(hdr); |
| 618 | repo_for_each_pack(the_repository, p) { |
| 619 | if (p->pack_local) |
| 620 | cnt++; |
| 621 | } |
| 622 | |
| 623 | strbuf_grow(&buf, cnt * 53 + 2); |
| 624 | repo_for_each_pack(the_repository, p) { |
| 625 | if (p->pack_local) |
| 626 | strbuf_addf(&buf, "P %s\n", p->pack_name + objdirlen + 6); |
| 627 | } |
| 628 | strbuf_addch(&buf, '\n'); |
| 629 | |
| 630 | hdr_nocache(hdr); |
| 631 | send_strbuf(hdr, "text/plain; charset=utf-8", &buf); |
| 632 | strbuf_release(&buf); |
| 633 | } |
| 634 | |
| 635 | static void check_content_type(struct strbuf *hdr, const char *accepted_type) |
| 636 | { |
nothing calls this directly
no test coverage detected