run-command: call run_command_v_opt_cd_env() instead of duplicating it
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
483bbd4e4c
commit
41e9bad75e
@ -577,9 +577,7 @@ static void prepare_run_command_v_opt(struct child_process *cmd,
|
|||||||
|
|
||||||
int run_command_v_opt(const char **argv, int opt)
|
int run_command_v_opt(const char **argv, int opt)
|
||||||
{
|
{
|
||||||
struct child_process cmd;
|
return run_command_v_opt_cd_env(argv, opt, NULL, NULL);
|
||||||
prepare_run_command_v_opt(&cmd, argv, opt);
|
|
||||||
return run_command(&cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env)
|
int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env)
|
||||||
|
Reference in New Issue
Block a user