tests: cosmetic improvements to the repo-setup test
[git/jnareb-git.git] / test-subprocess.c
blob667d3e5079bf06d540b214cd6f8e67922f141a02
1 #include "cache.h"
2 #include "run-command.h"
4 int main(int argc, char **argv)
6 const char *prefix;
7 struct child_process cp;
8 int nogit = 0;
10 prefix = setup_git_directory_gently(&nogit);
11 if (nogit)
12 die("No git repo found");
13 if (!strcmp(argv[1], "--setup-work-tree")) {
14 setup_work_tree();
15 argv++;
17 memset(&cp, 0, sizeof(cp));
18 cp.git_cmd = 1;
19 cp.argv = (const char **)argv+1;
20 return run_command(&cp);