interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / helper / test-subprocess.c

22 lines · 514 bytes Raw Blame History
1#define USE_THE_REPOSITORY_VARIABLE
2
3#include "test-tool.h"
4#include "run-command.h"
5#include "setup.h"
6
7int cmd__subprocess(int argc, const char **argv)
8{
9 struct child_process cp = CHILD_PROCESS_INIT;
10 int nogit = 0;
11
12 setup_git_directory_gently(the_repository, &nogit);
13 if (nogit)
14 die("No git repo found");
15 if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) {
16 setup_work_tree(the_repository);
17 argv++;
18 }
19 cp.git_cmd = 1;
20 strvec_pushv(&cp.args, (const char **)argv + 1);
21 return run_command(&cp);
22}