1#include "test-tool.h"
2#include "cache.h"
3#include "run-command.h"
45
int cmd__subprocess(int argc, const char **argv)
6{
7struct child_process cp = CHILD_PROCESS_INIT;
8int nogit = 0;
910
setup_git_directory_gently(&nogit);
11if (nogit)
12die("No git repo found");
13if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
14setup_work_tree();
15argv++;
16}
17cp.git_cmd = 1;
18cp.argv = (const char **)argv + 1;
19return run_command(&cp);
20}