Merge branch '2.30-rc1' of github.com:bitigchi/git-po
[alt-git.git] / t / helper / test-subprocess.c
blob92b69de635296d32d38d1f7d7589d5f8b6fbc296
1 #include "test-tool.h"
2 #include "cache.h"
3 #include "run-command.h"
5 int cmd__subprocess(int argc, const char **argv)
7 struct child_process cp = CHILD_PROCESS_INIT;
8 int nogit = 0;
10 setup_git_directory_gently(&nogit);
11 if (nogit)
12 die("No git repo found");
13 if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
14 setup_work_tree();
15 argv++;
17 cp.git_cmd = 1;
18 cp.argv = (const char **)argv + 1;
19 return run_command(&cp);