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

Function cmd__subprocess

t/helper/test-subprocess.c:7–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "setup.h"
6
7int cmd__subprocess(int argc, const char **argv)
8{
9 struct child_process cp = CHILD_PROCESS_INIT;
10 int nogit = 0;
11
12 setup_git_directory_gently(the_repository, &nogit);
13 if (nogit)
14 die("No git repo found");
15 if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
16 setup_work_tree(the_repository);
17 argv++;
18 }
19 cp.git_cmd = 1;
20 strvec_pushv(&cp.args, (const char **)argv + 1);
21 return run_command(&cp);
22}

Callers

nothing calls this directly

Calls 5

setup_work_treeFunction · 0.85
strvec_pushvFunction · 0.85
run_commandFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected