diff options
author | Emily Shaffer <emilyshaffer@google.com> | 2021-12-22 04:59:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-07 15:19:34 -0800 |
commit | 72ddf34d7c62a0b272d5cdd8f62fcfc782bb3a45 (patch) | |
tree | e47fbee766ad17bd4584b435d21411fe07e9b3e7 /builtin/clone.c | |
parent | merge: convert post-merge to use hook.h (diff) | |
download | tgif-72ddf34d7c62a0b272d5cdd8f62fcfc782bb3a45.tar.xz |
hooks: convert non-worktree 'post-checkout' hook to hook library
Move the running of the 'post-checkout' hook away from run-command.h
to the new hook.h library, except in the case of
builtin/worktree.c. That special-case will be handled in a subsequent
commit.
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
-rw-r--r-- | builtin/clone.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index fb377b2765..ee27b9f811 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -32,6 +32,7 @@ #include "connected.h" #include "packfile.h" #include "list-objects-filter-options.h" +#include "hook.h" /* * Overall FIXMEs: @@ -705,7 +706,7 @@ static int checkout(int submodule_progress) if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK)) die(_("unable to write new index file")); - err |= run_hook_le(NULL, "post-checkout", oid_to_hex(null_oid()), + err |= run_hooks_l("post-checkout", oid_to_hex(null_oid()), oid_to_hex(&oid), "1", NULL); if (!err && (option_recurse_submodules.nr > 0)) { |