diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-02-09 22:21:00 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-09 22:21:00 (GMT) |
commit | c70bc338e9a35b45263c3c68913ad516e9e70d62 (patch) | |
tree | d44d22a30a76b1f825d7b14e36b1e874ba24a922 /run-command.c | |
parent | bd75856ef73adce98f2492ea1534f178e93c6785 (diff) | |
parent | 95ba86a203213fb828de096dc0dba18ce94598f7 (diff) | |
download | git-c70bc338e9a35b45263c3c68913ad516e9e70d62.zip git-c70bc338e9a35b45263c3c68913ad516e9e70d62.tar.gz git-c70bc338e9a35b45263c3c68913ad516e9e70d62.tar.bz2 |
Merge branch 'ab/config-based-hooks-2'
More "config-based hooks".
* ab/config-based-hooks-2:
run-command: remove old run_hook_{le,ve}() hook API
receive-pack: convert push-to-checkout hook to hook.h
read-cache: convert post-index-change to use hook.h
commit: convert {pre-commit,prepare-commit-msg} hook to hook.h
git-p4: use 'git hook' to run hooks
send-email: use 'git hook run' for 'sendemail-validate'
git hook run: add an --ignore-missing flag
hooks: convert worktree 'post-checkout' hook to hook library
hooks: convert non-worktree 'post-checkout' hook to hook library
merge: convert post-merge to use hook.h
am: convert applypatch-msg to use hook.h
rebase: convert pre-rebase to use hook.h
hook API: add a run_hooks_l() wrapper
am: convert {pre,post}-applypatch to use hook.h
gc: use hook library for pre-auto-gc hook
hook API: add a run_hooks() wrapper
hook: add 'run' subcommand
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/run-command.c b/run-command.c index 69dde42..a8501e3 100644 --- a/run-command.c +++ b/run-command.c @@ -1307,39 +1307,6 @@ int async_with_fork(void) #endif } -int run_hook_ve(const char *const *env, const char *name, va_list args) -{ - struct child_process hook = CHILD_PROCESS_INIT; - const char *p; - - p = find_hook(name); - if (!p) - return 0; - - strvec_push(&hook.args, p); - while ((p = va_arg(args, const char *))) - strvec_push(&hook.args, p); - if (env) - strvec_pushv(&hook.env_array, (const char **)env); - hook.no_stdin = 1; - hook.stdout_to_stderr = 1; - hook.trace2_hook_name = name; - - return run_command(&hook); -} - -int run_hook_le(const char *const *env, const char *name, ...) -{ - va_list args; - int ret; - - va_start(args, name); - ret = run_hook_ve(env, name, args); - va_end(args); - - return ret; -} - struct io_pump { /* initialized by caller */ int fd; |