summaryrefslogtreecommitdiff
path: root/hook.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-12-22 03:59:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-01-07 23:19:34 (GMT)
commitab81cf242c67182911352aeacdd6aabb68a8555c (patch)
tree29513ef9c8dbdc717405fc081d03d8cff69a74e2 /hook.h
parent593ffdd80b33577e6b89a9b8e2e877f162b0b9e4 (diff)
downloadgit-ab81cf242c67182911352aeacdd6aabb68a8555c.zip
git-ab81cf242c67182911352aeacdd6aabb68a8555c.tar.gz
git-ab81cf242c67182911352aeacdd6aabb68a8555c.tar.bz2
hook API: add a run_hooks_l() wrapper
Add a run_hooks_l() wrapper, we'll use it in subsequent commits for the simple cases of wanting to run a single hook under a given name along with a list of arguments. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hook.h')
-rw-r--r--hook.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/hook.h b/hook.h
index 9c35878..5452839 100644
--- a/hook.h
+++ b/hook.h
@@ -54,4 +54,14 @@ int run_hooks_opt(const char *hook_name, struct run_hooks_opt *options);
* run_hooks_opt" initialized with "RUN_HOOKS_OPT_INIT".
*/
int run_hooks(const char *hook_name);
+
+/**
+ * Like run_hooks(), a wrapper for run_hooks_opt().
+ *
+ * In addition to the wrapping behavior provided by run_hooks(), this
+ * wrapper takes a list of strings terminated by a NULL
+ * argument. These things will be used as positional arguments to the
+ * hook. This function behaves like the old run_hook_le() API.
+ */
+int run_hooks_l(const char *hook_name, ...);
#endif