diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-02-09 14:21:00 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-02-09 14:21:00 -0800 |
| commit | c70bc338e9a35b45263c3c68913ad516e9e70d62 (patch) | |
| tree | d44d22a30a76b1f825d7b14e36b1e874ba24a922 /builtin/checkout.c | |
| parent | bd75856ef73adce98f2492ea1534f178e93c6785 (diff) | |
| parent | 95ba86a203213fb828de096dc0dba18ce94598f7 (diff) | |
| download | git-c70bc338e9a35b45263c3c68913ad516e9e70d62.tar.gz | |
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 'builtin/checkout.c')
| -rw-r--r-- | builtin/checkout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index cc804ba8e1..8f010412a9 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -9,6 +9,7 @@ #include "config.h" #include "diff.h" #include "dir.h" +#include "hook.h" #include "ll-merge.h" #include "lockfile.h" #include "merge-recursive.h" @@ -114,7 +115,7 @@ static void branch_info_release(struct branch_info *info) static int post_checkout_hook(struct commit *old_commit, struct commit *new_commit, int changed) { - return run_hook_le(NULL, "post-checkout", + return run_hooks_l("post-checkout", oid_to_hex(old_commit ? &old_commit->object.oid : null_oid()), oid_to_hex(new_commit ? &new_commit->object.oid : null_oid()), changed ? "1" : "0", NULL); |
