Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/hook.c
diff options
context:
space:
mode:
Diffstat (limited to 'hook.c')
-rw-r--r--hook.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hook.c b/hook.c
index 69a215b2c3..1d51be3b77 100644
--- a/hook.c
+++ b/hook.c
@@ -96,9 +96,13 @@ static int notify_hook_finished(int result,
void *pp_task_cb)
{
struct hook_cb_data *hook_cb = pp_cb;
+ struct run_hooks_opt *opt = hook_cb->options;
hook_cb->rc |= result;
+ if (opt->invoked_hook)
+ *opt->invoked_hook = 1;
+
return 0;
}
@@ -123,6 +127,9 @@ int run_hooks_opt(const char *hook_name, struct run_hooks_opt *options)
if (!options)
BUG("a struct run_hooks_opt must be provided to run_hooks");
+ if (options->invoked_hook)
+ *options->invoked_hook = 0;
+
if (!hook_path && !options->error_if_missing)
goto cleanup;