Merge branch 'nd/checkout-keep-sparse'
[git/gitweb.git] / test-subprocess.c
blobf2d4c0d22bd418836eb47424a03d0e903246d92e
1 #include "cache.h"
2 #include "run-command.h"
4 int main(int argc, const char **argv)
6 struct child_process cp;
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 memset(&cp, 0, sizeof(cp));
17 cp.git_cmd = 1;
18 cp.argv = argv + 1;
19 return run_command(&cp);