MCPcopy Index your code
hub / github.com/git/git / do_generic_cmd

Function do_generic_cmd

shell.c:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#define NOLOGIN_COMMAND COMMAND_DIR "/no-interactive-login"
11
12static int do_generic_cmd(const char *me, char *arg)
13{
14 const char *my_argv[4];
15
16 setup_path();
17 if (!arg || !(arg = sq_dequote(arg)) || *arg == '-')
18 die("bad argument");
19 if (!skip_prefix(me, "git-", &me))
20 die("bad command");
21
22 my_argv[0] = me;
23 my_argv[1] = arg;
24 my_argv[2] = NULL;
25
26 return execv_git_cmd(my_argv);
27}
28
29static int is_valid_cmd_name(const char *cmd)
30{

Callers

nothing calls this directly

Calls 4

setup_pathFunction · 0.85
sq_dequoteFunction · 0.85
execv_git_cmdFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected