| 2683 | {"index-pack", "--stdin", NULL}; |
| 2684 | |
| 2685 | int finish_http_pack_request(struct http_pack_request *preq) |
| 2686 | { |
| 2687 | struct child_process ip = CHILD_PROCESS_INIT; |
| 2688 | int tmpfile_fd; |
| 2689 | int ret = 0; |
| 2690 | |
| 2691 | fclose(preq->packfile); |
| 2692 | preq->packfile = NULL; |
| 2693 | |
| 2694 | tmpfile_fd = xopen(preq->tmpfile.buf, O_RDONLY); |
| 2695 | |
| 2696 | ip.git_cmd = 1; |
| 2697 | ip.in = tmpfile_fd; |
| 2698 | strvec_pushv(&ip.args, preq->index_pack_args ? |
| 2699 | preq->index_pack_args : |
| 2700 | default_index_pack_args); |
| 2701 | |
| 2702 | if (preq->preserve_index_pack_stdout) |
| 2703 | ip.out = 0; |
| 2704 | else |
| 2705 | ip.no_stdout = 1; |
| 2706 | |
| 2707 | if (run_command(&ip)) { |
| 2708 | ret = -1; |
| 2709 | goto cleanup; |
| 2710 | } |
| 2711 | |
| 2712 | cleanup: |
| 2713 | close(tmpfile_fd); |
| 2714 | unlink(preq->tmpfile.buf); |
| 2715 | return ret; |
| 2716 | } |
| 2717 | |
| 2718 | void http_install_packfile(struct packed_git *p, |
| 2719 | struct packfile_list *list_to_remove_from) |
no test coverage detected