diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-09-26 21:03:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-27 18:44:54 +0200 |
commit | 07a348e7461afe9411004a0501034cb3ff1cdee8 (patch) | |
tree | a32c560bec3ad2619c621d52c79455d1dd66196a /builtin/receive-pack.c | |
parent | hook.c: add a hook_exists() wrapper and use it in bugreport.c (diff) | |
download | git-07a348e7461afe9411004a0501034cb3ff1cdee8.tar.xz git-07a348e7461afe9411004a0501034cb3ff1cdee8.zip |
hook.c users: use "hook_exists()" instead of "find_hook()"
Use the new hook_exists() function instead of find_hook() where the
latter was called in boolean contexts. This make subsequent changes in
a series where we further refactor the hook API clearer, as we won't
conflate wanting to get the path of the hook with checking for its
existence.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r-- | builtin/receive-pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index e3895aec62..25cc0c907e 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1464,7 +1464,7 @@ static const char *update_worktree(unsigned char *sha1, const struct worktree *w strvec_pushf(&env, "GIT_DIR=%s", absolute_path(git_dir)); - if (!find_hook(push_to_checkout_hook)) + if (!hook_exists(push_to_checkout_hook)) retval = push_to_deploy(sha1, &env, work_tree); else retval = push_to_checkout(sha1, &env, work_tree); |