mingw: handle GITPERLLIB in t0021 in a Windows-compatible way
[git.git] / t / helper / test-subprocess.c
blob30c5765bfc3590421c21bc2350eed882752de3a0
1 #include "cache.h"
2 #include "run-command.h"
4 int cmd_main(int argc, const char **argv)
6 struct child_process cp = CHILD_PROCESS_INIT;
7 int nogit = 0;
9 setup_git_directory_gently(&nogit);
10 if (nogit)
11 die("No git repo found");
12 if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
13 setup_work_tree();
14 argv++;
16 cp.git_cmd = 1;
17 cp.argv = (const char **)argv + 1;
18 return run_command(&cp);