Code

Merge branch 'maint'
[git.git] / run-command.c
index bbb9c777e583c345d25a6651f9ddf7725c10f6af..c90cdc50e3165bcdb798c85b2dc7b929a9b0a144 100644 (file)
@@ -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;