Message ID | patch-1.1-38b21b65bee-20210909T125613Z-avarab@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4] fixup! hook: run a list of hooks instead | expand |
diff --git a/hook.c b/hook.c index dc3033cb4c7..4b4205bce6c 100644 --- a/hook.c +++ b/hook.c @@ -416,8 +416,10 @@ int run_hooks_oneshot(const char *hook_name, struct run_hooks_opt *options) * If you need to act on a missing hook, use run_found_hooks() * instead */ - if (list_empty(hooks)) + if (list_empty(hooks)) { + clear_hook_list(hooks); goto cleanup; + } ret = run_hooks(hook_name, hooks, options);