[PATCH v9 33/37] bugreport: use hook_exists instead of find_hook
- From
Emily Shaffer <emilyshaffer@google.com>
- Date
- May 27, 2021, 00:08 UTC
- Message-ID
- <20210527000856.695702-34-emilyshaffer@google.com>
- In-Reply-To
- <20210527000856.695702-1-emilyshaffer@google.com>
By using the helper in hook.h instead of the one in run-command.h, we can also check whether a hook exists in the config - not just whether it exists in the hookdir.
Signed-off-by: Emily Shaffer <emilyshaffer@google.com> --- builtin/bugreport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/bugreport.c b/builtin/bugreport.c index 9915a5841d..190272ba70 100644 --- a/builtin/bugreport.c +++ b/builtin/bugreport.c @@ -3,7 +3,7 @@ #include "strbuf.h" #include "help.h" #include "compat/compiler.h" -#include "run-command.h" +#include "hook.h" static void get_system_info(struct strbuf *sys_info) @@ -82,7 +82,7 @@ static void get_populated_hooks(struct strbuf *hook_info, int nongit) } for (i = 0; i < ARRAY_SIZE(hook); i++) - if (find_hook(hook[i])) + if (hook_exists(hook[i], HOOKDIR_USE_CONFIG)) strbuf_addf(hook_info, "%s\n", hook[i]); }
-- 2.31.1.818.g46aad6cb9e-goog