X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=run-command.c;h=c90cdc50e3165bcdb798c85b2dc7b929a9b0a144;hb=1689c5de8730ea334535337a341db3c7a21ad002;hp=bbb9c777e583c345d25a6651f9ddf7725c10f6af;hpb=1b118da8bd1878d78589afd9f755b9d52a9579ad;p=git.git diff --git a/run-command.c b/run-command.c index bbb9c777e..c90cdc50e 100644 --- a/run-command.c +++ b/run-command.c @@ -111,6 +111,8 @@ int start_command(struct child_process *cmd) unsetenv(*cmd->env); } } + if (cmd->preexec_cb) + cmd->preexec_cb(); if (cmd->git_cmd) { execv_git_cmd(cmd->argv); } else { @@ -271,14 +273,6 @@ int run_command_v_opt(const char **argv, int opt) return run_command(&cmd); } -int run_command_v_opt_cd(const char **argv, int opt, const char *dir) -{ - struct child_process cmd; - prepare_run_command_v_opt(&cmd, argv, opt); - cmd.dir = dir; - return run_command(&cmd); -} - int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env) { struct child_process cmd;