MCPcopy Create free account
hub / github.com/git/git / list_hooks

Function list_hooks

hook.c:535–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535struct string_list *list_hooks(struct repository *r, const char *hookname,
536 struct run_hooks_opt *options)
537{
538 struct string_list *hook_head;
539
540 if (!hookname)
541 BUG("null hookname was provided to hook_list()!");
542
543 CALLOC_ARRAY(hook_head, 1);
544 string_list_init_dup(hook_head);
545
546 /* Add hooks from the config, e.g. hook.myhook.event = pre-commit */
547 list_hooks_add_configured(r, hookname, hook_head, options);
548
549 /* Add the default "traditional" hooks from hookdir. */
550 list_hooks_add_default(r, hookname, hook_head, options);
551
552 return hook_head;
553}
554
555int hook_exists(struct repository *r, const char *name)
556{

Callers 3

hook_existsFunction · 0.85
run_hooks_optFunction · 0.85
listFunction · 0.85

Calls 3

string_list_init_dupFunction · 0.85
list_hooks_add_defaultFunction · 0.85

Tested by

no test coverage detected