1#include "cache.h"
2#include "run-command.h"
34
int cmd_main(int argc, const char **argv)
5{
6struct child_process cp = CHILD_PROCESS_INIT;
7int nogit = 0;
89
setup_git_directory_gently(&nogit);
10if (nogit)
11die("No git repo found");
12if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
13setup_work_tree();
14argv++;
15}
16cp.git_cmd = 1;
17cp.argv = (const char **)argv + 1;
18return run_command(&cp);
19}