argv[dest_argc] = NULL;
if (verbose)
fprintf(stderr, "Pushing to %s\n", dest);
- err = run_command_v(argc, argv);
+ err = run_command_v(argv);
if (!err)
continue;
switch (err) {
argc++;
}
argv[argc] = NULL;
- run_command_v_opt(argc, argv, RUN_COMMAND_NO_STDIO);
+ run_command_v_opt(argv, RUN_COMMAND_NO_STDIO);
}
/*
unpacker[0] = "unpack-objects";
unpacker[1] = hdr_arg;
unpacker[2] = NULL;
- code = run_command_v_opt(1, unpacker, RUN_GIT_CMD);
+ code = run_command_v_opt(unpacker, RUN_GIT_CMD);
switch (code) {
case 0:
return NULL;
#include "run-command.h"
#include "exec_cmd.h"
-int run_command_v_opt(int argc, const char **argv, int flags)
+int run_command_v_opt(const char **argv, int flags)
{
pid_t pid = fork();
}
}
-int run_command_v(int argc, const char **argv)
+int run_command_v(const char **argv)
{
- return run_command_v_opt(argc, argv, 0);
+ return run_command_v_opt(argv, 0);
}
int run_command(const char *cmd, ...)
va_end(param);
if (MAX_RUN_COMMAND_ARGS <= argc)
return error("too many args to run %s", cmd);
- return run_command_v_opt(argc, argv, 0);
+ return run_command_v_opt(argv, 0);
}
#define RUN_COMMAND_NO_STDIO 1
#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
-int run_command_v_opt(int argc, const char **argv, int opt);
-int run_command_v(int argc, const char **argv);
+int run_command_v_opt(const char **argv, int opt);
+int run_command_v(const char **argv);
int run_command(const char *cmd, ...);
#endif