Code

git config: don't allow extra arguments for -e or -l.
[git.git] / run-command.h
index debe3074b5a01fb5a19e61f07ff66c250cdc4f82..15e870a65eb037cd49d1e01251711915da06d260 100644 (file)
@@ -10,6 +10,7 @@ enum {
        ERR_RUN_COMMAND_WAITPID_SIGNAL,
        ERR_RUN_COMMAND_WAITPID_NOEXIT,
 };
+#define IS_RUN_COMMAND_ERR(x) ((x) <= -ERR_RUN_COMMAND_FORK)
 
 struct child_process {
        const char **argv;
@@ -42,17 +43,19 @@ struct child_process {
        unsigned no_stderr:1;
        unsigned git_cmd:1; /* if this is to be git sub-command */
        unsigned stdout_to_stderr:1;
+       void (*preexec_cb)(void);
 };
 
 int start_command(struct child_process *);
 int finish_command(struct child_process *);
 int run_command(struct child_process *);
 
+extern int run_hook(const char *index_file, const char *name, ...);
+
 #define RUN_COMMAND_NO_STDIN 1
 #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".
@@ -76,7 +79,12 @@ struct async {
        int (*proc)(int fd, void *data);
        void *data;
        int out;        /* caller reads from here and closes it */
+#ifndef __MINGW32__
        pid_t pid;
+#else
+       HANDLE tid;
+       int fd_for_proc;
+#endif
 };
 
 int start_async(struct async *async);