X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=run-command.h;h=e3455028435eab958d5f86a3e86249f1704b9c1b;hb=d00e364de99d51bb76e437820e23cfa820417ec5;hp=e90d9282ff5a0a6dde2d1a9813063a7b2c7bcf91;hpb=e10d48de74ec8c01d0528217abf465af7bbf5a56;p=git.git diff --git a/run-command.h b/run-command.h index e90d9282f..e34550284 100644 --- a/run-command.h +++ b/run-command.h @@ -10,7 +10,7 @@ enum { ERR_RUN_COMMAND_WAITPID_SIGNAL, ERR_RUN_COMMAND_WAITPID_NOEXIT, }; -#define IS_RUN_COMMAND_ERR(x) ((x) <= -ERR_RUN_COMMAND_FORK) +#define IS_RUN_COMMAND_ERR(x) (-(x) >= ERR_RUN_COMMAND_FORK) struct child_process { const char **argv; @@ -50,6 +50,8 @@ 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