Remove now unused spawnv_git_cmd().

This commit is contained in:
Johannes Sixt
2007-11-18 20:30:15 +01:00
parent 3393222e48
commit 855cdbbc3b
2 changed files with 0 additions and 29 deletions

View File

@@ -1,7 +1,6 @@
#include "cache.h"
#include "exec_cmd.h"
#include "quote.h"
#include "spawn-pipe.h"
#define MAX_ARGS 32
extern char **environ;
@@ -155,30 +154,3 @@ int execl_git_cmd(const char *cmd,...)
argv[argc] = NULL;
return execv_git_cmd(argv);
}
int spawnv_git_cmd(const char **argv, int pin[2], int pout[2])
{
pid_t pid;
struct strbuf cmd;
const char *tmp;
strbuf_init(&cmd, 0);
strbuf_addf(&cmd, "git-%s", argv[0]);
/* argv[0] must be the git command, but the argv array
* belongs to the caller. Save argv[0] and
* restore it later.
*/
tmp = argv[0];
argv[0] = cmd.buf;
trace_argv_printf(argv, -1, "trace: exec:");
pid = spawnvpe_pipe(cmd.buf, argv, environ,
pin, pout);
argv[0] = tmp;
return pid;
}

View File

@@ -6,7 +6,6 @@ extern const char* git_exec_path(void);
extern void setup_path(const char *);
extern int execv_git_cmd(const char **argv); /* NULL terminated */
extern int execl_git_cmd(const char *cmd, ...);
extern int spawnv_git_cmd(const char **argv, int pin[2], int pout[2]);
#endif /* GIT_EXEC_CMD_H */