setup.h: move declarations for setup.c functions from cache.h
[git.git] / t / helper / test-subprocess.c
blob65a355cc590a1143d1ba7064d2c87d7fcb8d9056
1 #include "test-tool.h"
2 #include "cache.h"
3 #include "run-command.h"
4 #include "setup.h"
6 int cmd__subprocess(int argc, const char **argv)
8 struct child_process cp = CHILD_PROCESS_INIT;
9 int nogit = 0;
11 setup_git_directory_gently(&nogit);
12 if (nogit)
13 die("No git repo found");
14 if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
15 setup_work_tree();
16 argv++;
18 cp.git_cmd = 1;
19 strvec_pushv(&cp.args, (const char **)argv + 1);
20 return run_command(&cp);