mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
Remove now unused spawnv_git_cmd().
This commit is contained in:
28
exec_cmd.c
28
exec_cmd.c
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user