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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hook.c b/hook.c
index d67a114e62..1ad123422b 100644
--- a/hook.c
+++ b/hook.c
@@ -149,3 +149,17 @@ int run_hooks(const char *hook_name)
return run_hooks_opt(hook_name, &opt);
}
+
+int run_hooks_l(const char *hook_name, ...)
+{
+ struct run_hooks_opt opt = RUN_HOOKS_OPT_INIT;
+ va_list ap;
+ const char *arg;
+
+ va_start(ap, hook_name);
+ while ((arg = va_arg(ap, const char *)))
+ strvec_push(&opt.args, arg);
+ va_end(ap);
+
+ return run_hooks_opt(hook_name, &opt);
+}