Code

Make merge-recursive honor diff.renamelimit
[git.git] / run-command.h
index ff090679a6fecd66bda4fba804a8ab6555571aa9..7958eb1e0b7a927019460e06d7a01622eddf81df 100644 (file)
@@ -15,8 +15,13 @@ struct child_process {
        const char **argv;
        pid_t pid;
        int in;
+       int out;
+       const char *dir;
+       const char *const *env;
        unsigned close_in:1;
+       unsigned close_out:1;
        unsigned no_stdin:1;
+       unsigned no_stdout:1;
        unsigned git_cmd:1; /* if this is to be git sub-command */
        unsigned stdout_to_stderr:1;
 };
@@ -29,5 +34,12 @@ int run_command(struct child_process *);
 #define RUN_GIT_CMD         2  /*If this is to be git sub-command */
 #define RUN_COMMAND_STDOUT_TO_STDERR 4
 int run_command_v_opt(const char **argv, int opt);
+int run_command_v_opt_cd(const char **argv, int opt, const char *dir);
+
+/*
+ * env (the environment) is to be formatted like environ: "VAR=VALUE".
+ * To unset an environment variable use just "VAR".
+ */
+int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env);
 
 #endif