From 330155ed8af3b2e050ac74554993ba68d303e8c3 Mon Sep 17 00:00:00 2001 From: Emily Shaffer Date: Sun, 26 Sep 2021 21:03:27 +0200 Subject: hook.c: add a hook_exists() wrapper and use it in bugreport.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a boolean version of the find_hook() function for those callers who are only interested in checking whether the hook exists, not what the path to it is. Signed-off-by: Emily Shaffer Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- hook.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hook.h') diff --git a/hook.h b/hook.h index 68624f1605..6aa36fc7ff 100644 --- a/hook.h +++ b/hook.h @@ -8,4 +8,9 @@ */ const char *find_hook(const char *name); +/** + * A boolean version of find_hook() + */ +int hook_exists(const char *hookname); + #endif -- cgit v1.3