From 07a348e7461afe9411004a0501034cb3ff1cdee8 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Sun, 26 Sep 2021 21:03:28 +0200 Subject: hook.c users: use "hook_exists()" instead of "find_hook()" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sequencer.c') diff --git a/sequencer.c b/sequencer.c index 8ee6c4ac24..e501945796 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1460,7 +1460,7 @@ static int try_to_commit(struct repository *r, } } - if (find_hook("prepare-commit-msg")) { + if (hook_exists("prepare-commit-msg")) { res = run_prepare_commit_msg_hook(r, msg, hook_commit); if (res) goto out; -- cgit v1.3