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

Function finish_http_pack_request

http.c:2685–2716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2683 {"index-pack", "--stdin", NULL};
2684
2685int 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
2712cleanup:
2713 close(tmpfile_fd);
2714 unlink(preq->tmpfile.buf);
2715 return ret;
2716}
2717
2718void http_install_packfile(struct packed_git *p,
2719 struct packfile_list *list_to_remove_from)

Callers 3

http_fetch_packFunction · 0.85
finish_requestFunction · 0.85
fetch_single_packfileFunction · 0.85

Calls 3

xopenFunction · 0.85
strvec_pushvFunction · 0.85
run_commandFunction · 0.85

Tested by

no test coverage detected