git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Bagas Sanjaya" <bagasdotme@gmail.com>,
	"Emily Shaffer" <emilyshaffer@google.com>,
	"René Scharfe" <l.s.r@web.de>,
	"Phillip Wood" <phillip.wood123@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v5 01/17] hook: add 'run' subcommand
Date: Tue, 23 Nov 2021 12:46:00 +0100	[thread overview]
Message-ID: <patch-v5-01.17-4ca52feebb8-20211123T114206Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-v5-00.17-00000000000-20211123T114206Z-avarab@gmail.com>

From: Emily Shaffer <emilyshaffer@google.com>

In order to enable hooks to be run as an external process, by a
standalone Git command, or by tools which wrap Git, provide an external
means to run all configured hook commands for a given hook event.

Most of our hooks require more complex functionality than this, but
let's start with the bare minimum required to support our simplest
hooks.

In terms of implementation the usage_with_options() and "goto usage"
pattern here mirrors that of
builtin/{commit-graph,multi-pack-index}.c.

Some of the implementation here, such as a function being named
run_hooks_opt() when it's tasked with running one hook, to using the
run_processes_parallel_tr2() API to run with jobs=1 is somewhere
between a bit odd and and an overkill for the current features of this
"hook run" command and the hook.[ch] API.

This code will eventually be able to run multiple hooks declared in
config in parallel, by starting out with these names and APIs we
reduce the later churn of renaming functions, switching from the
run_command() to run_processes_parallel_tr2() API etc.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 .gitignore                 |   1 +
 Documentation/git-hook.txt |  37 +++++++++++
 Documentation/githooks.txt |   4 ++
 Makefile                   |   1 +
 builtin.h                  |   1 +
 builtin/hook.c             |  80 +++++++++++++++++++++++
 command-list.txt           |   1 +
 git.c                      |   1 +
 hook.c                     | 102 +++++++++++++++++++++++++++++
 hook.h                     |  35 ++++++++++
 t/t1800-hook.sh            | 129 +++++++++++++++++++++++++++++++++++++
 11 files changed, 392 insertions(+)
 create mode 100644 Documentation/git-hook.txt
 create mode 100644 builtin/hook.c
 create mode 100755 t/t1800-hook.sh

diff --git a/.gitignore b/.gitignore
index 054249b20a8..f817c509ec0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,6 +77,7 @@
 /git-grep
 /git-hash-object
 /git-help
+/git-hook
 /git-http-backend
 /git-http-fetch
 /git-http-push
diff --git a/Documentation/git-hook.txt b/Documentation/git-hook.txt
new file mode 100644
index 00000000000..e39b1b5d069
--- /dev/null
+++ b/Documentation/git-hook.txt
@@ -0,0 +1,37 @@
+git-hook(1)
+===========
+
+NAME
+----
+git-hook - Run git hooks
+
+SYNOPSIS
+--------
+[verse]
+'git hook' run <hook-name> [-- <hook-args>]
+
+DESCRIPTION
+-----------
+
+A command interface to running git hooks (see linkgit:githooks[5]),
+for use by other scripted git commands.
+
+SUBCOMMANDS
+-----------
+
+run::
+	Run the `<hook-name>` hook. See linkgit:githooks[5] for
+	supported hook names.
++
+
+Any positional arguments to the hook should be passed after a
+mandatory `--` (or `--end-of-options`, see linkgit:gitcli[7]). See
+linkgit:githooks[5] for arguments hooks might expect (if any).
+
+SEE ALSO
+--------
+linkgit:githooks[5]
+
+GIT
+---
+Part of the linkgit:git[1] suite
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index b51959ff941..a16e62bc8c8 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -698,6 +698,10 @@ and "0" meaning they were not.
 Only one parameter should be set to "1" when the hook runs.  The hook
 running passing "1", "1" should not be possible.
 
+SEE ALSO
+--------
+linkgit:git-hook[1]
+
 GIT
 ---
 Part of the linkgit:git[1] suite
diff --git a/Makefile b/Makefile
index 12be39ac497..6cd20534304 100644
--- a/Makefile
+++ b/Makefile
@@ -1107,6 +1107,7 @@ BUILTIN_OBJS += builtin/get-tar-commit-id.o
 BUILTIN_OBJS += builtin/grep.o
 BUILTIN_OBJS += builtin/hash-object.o
 BUILTIN_OBJS += builtin/help.o
+BUILTIN_OBJS += builtin/hook.o
 BUILTIN_OBJS += builtin/index-pack.o
 BUILTIN_OBJS += builtin/init-db.o
 BUILTIN_OBJS += builtin/interpret-trailers.o
diff --git a/builtin.h b/builtin.h
index 8a58743ed63..83379f3832c 100644
--- a/builtin.h
+++ b/builtin.h
@@ -164,6 +164,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix);
 int cmd_grep(int argc, const char **argv, const char *prefix);
 int cmd_hash_object(int argc, const char **argv, const char *prefix);
 int cmd_help(int argc, const char **argv, const char *prefix);
+int cmd_hook(int argc, const char **argv, const char *prefix);
 int cmd_index_pack(int argc, const char **argv, const char *prefix);
 int cmd_init_db(int argc, const char **argv, const char *prefix);
 int cmd_interpret_trailers(int argc, const char **argv, const char *prefix);
diff --git a/builtin/hook.c b/builtin/hook.c
new file mode 100644
index 00000000000..9b67ff50cef
--- /dev/null
+++ b/builtin/hook.c
@@ -0,0 +1,80 @@
+#include "cache.h"
+#include "builtin.h"
+#include "config.h"
+#include "hook.h"
+#include "parse-options.h"
+#include "strbuf.h"
+#include "strvec.h"
+
+#define BUILTIN_HOOK_RUN_USAGE \
+	N_("git hook run <hook-name> [-- <hook-args>]")
+
+static const char * const builtin_hook_usage[] = {
+	BUILTIN_HOOK_RUN_USAGE,
+	NULL
+};
+
+static const char * const builtin_hook_run_usage[] = {
+	BUILTIN_HOOK_RUN_USAGE,
+	NULL
+};
+
+static int run(int argc, const char **argv, const char *prefix)
+{
+	int i;
+	struct run_hooks_opt opt = RUN_HOOKS_OPT_INIT;
+	const char *hook_name;
+	struct option run_options[] = {
+		OPT_END(),
+	};
+	int ret;
+
+	argc = parse_options(argc, argv, prefix, run_options,
+			     builtin_hook_run_usage,
+			     PARSE_OPT_KEEP_DASHDASH);
+
+	if (!argc)
+		goto usage;
+
+	/*
+	 * Having a -- for "run" when providing <hook-args> is
+	 * mandatory.
+	 */
+	if (argc > 1 && strcmp(argv[1], "--") &&
+	    strcmp(argv[1], "--end-of-options"))
+		goto usage;
+
+	/* Add our arguments, start after -- */
+	for (i = 2 ; i < argc; i++)
+		strvec_push(&opt.args, argv[i]);
+
+	/* Need to take into account core.hooksPath */
+	git_config(git_default_config, NULL);
+
+	hook_name = argv[0];
+	opt.error_if_missing = 1;
+	ret = run_hooks_opt(hook_name, &opt);
+	if (ret < 0) /* error() return */
+		ret = 1;
+	return ret;
+usage:
+	usage_with_options(builtin_hook_run_usage, run_options);
+}
+
+int cmd_hook(int argc, const char **argv, const char *prefix)
+{
+	struct option builtin_hook_options[] = {
+		OPT_END(),
+	};
+
+	argc = parse_options(argc, argv, NULL, builtin_hook_options,
+			     builtin_hook_usage, PARSE_OPT_STOP_AT_NON_OPTION);
+	if (!argc)
+		goto usage;
+
+	if (!strcmp(argv[0], "run"))
+		return run(argc, argv, prefix);
+
+usage:
+	usage_with_options(builtin_hook_usage, builtin_hook_options);
+}
diff --git a/command-list.txt b/command-list.txt
index eb9cee8dee9..0c9af14bdf3 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -103,6 +103,7 @@ git-grep                                mainporcelain           info
 git-gui                                 mainporcelain
 git-hash-object                         plumbingmanipulators
 git-help                                ancillaryinterrogators          complete
+git-hook                                purehelpers
 git-http-backend                        synchingrepositories
 git-http-fetch                          synchelpers
 git-http-push                           synchelpers
diff --git a/git.c b/git.c
index 5ff21be21f3..a5be02b04b8 100644
--- a/git.c
+++ b/git.c
@@ -538,6 +538,7 @@ static struct cmd_struct commands[] = {
 	{ "grep", cmd_grep, RUN_SETUP_GENTLY },
 	{ "hash-object", cmd_hash_object },
 	{ "help", cmd_help },
+	{ "hook", cmd_hook, RUN_SETUP },
 	{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY | NO_PARSEOPT },
 	{ "init", cmd_init_db },
 	{ "init-db", cmd_init_db },
diff --git a/hook.c b/hook.c
index 55e1145a4b7..a0917cf877c 100644
--- a/hook.c
+++ b/hook.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "hook.h"
 #include "run-command.h"
+#include "config.h"
 
 const char *find_hook(const char *name)
 {
@@ -40,3 +41,104 @@ int hook_exists(const char *name)
 {
 	return !!find_hook(name);
 }
+
+static int pick_next_hook(struct child_process *cp,
+			  struct strbuf *out,
+			  void *pp_cb,
+			  void **pp_task_cb)
+{
+	struct hook_cb_data *hook_cb = pp_cb;
+	const char *hook_path = hook_cb->hook_path;
+
+	if (!hook_path)
+		return 0;
+
+	cp->no_stdin = 1;
+	strvec_pushv(&cp->env_array, hook_cb->options->env.v);
+	cp->stdout_to_stderr = 1;
+	cp->trace2_hook_name = hook_cb->hook_name;
+
+	strvec_push(&cp->args, hook_path);
+	strvec_pushv(&cp->args, hook_cb->options->args.v);
+
+	/* Provide context for errors if necessary */
+	*pp_task_cb = (char *)hook_path;
+
+	/*
+	 * This pick_next_hook() will be called again, we're only
+	 * running one hook, so indicate that no more work will be
+	 * done.
+	 */
+	hook_cb->hook_path = NULL;
+
+	return 1;
+}
+
+static int notify_start_failure(struct strbuf *out,
+				void *pp_cb,
+				void *pp_task_cp)
+{
+	struct hook_cb_data *hook_cb = pp_cb;
+	const char *hook_path = pp_task_cp;
+
+	hook_cb->rc |= 1;
+
+	strbuf_addf(out, _("Couldn't start hook '%s'\n"),
+		    hook_path);
+
+	return 1;
+}
+
+static int notify_hook_finished(int result,
+				struct strbuf *out,
+				void *pp_cb,
+				void *pp_task_cb)
+{
+	struct hook_cb_data *hook_cb = pp_cb;
+
+	hook_cb->rc |= result;
+
+	return 0;
+}
+
+static void run_hooks_opt_clear(struct run_hooks_opt *options)
+{
+	strvec_clear(&options->env);
+	strvec_clear(&options->args);
+}
+
+int run_hooks_opt(const char *hook_name, struct run_hooks_opt *options)
+{
+	struct hook_cb_data cb_data = {
+		.rc = 0,
+		.hook_name = hook_name,
+		.options = options,
+	};
+	const char *const hook_path = find_hook(hook_name);
+	int jobs = 1;
+	int ret = 0;
+
+	if (!options)
+		BUG("a struct run_hooks_opt must be provided to run_hooks");
+
+	if (!hook_path && !options->error_if_missing)
+		goto cleanup;
+
+	if (!hook_path) {
+		ret = error("cannot find a hook named %s", hook_name);
+		goto cleanup;
+	}
+
+	cb_data.hook_path = hook_path;
+	run_processes_parallel_tr2(jobs,
+				   pick_next_hook,
+				   notify_start_failure,
+				   notify_hook_finished,
+				   &cb_data,
+				   "hook",
+				   hook_name);
+	ret = cb_data.rc;
+cleanup:
+	run_hooks_opt_clear(options);
+	return ret;
+}
diff --git a/hook.h b/hook.h
index 6aa36fc7ff9..782385cc235 100644
--- a/hook.h
+++ b/hook.h
@@ -1,5 +1,31 @@
 #ifndef HOOK_H
 #define HOOK_H
+#include "strvec.h"
+
+struct run_hooks_opt
+{
+	/* Environment vars to be set for each hook */
+	struct strvec env;
+
+	/* Args to be passed to each hook */
+	struct strvec args;
+
+	/* Emit an error if the hook is missing */
+	unsigned int error_if_missing:1;
+};
+
+#define RUN_HOOKS_OPT_INIT { \
+	.env = STRVEC_INIT, \
+	.args = STRVEC_INIT, \
+}
+
+struct hook_cb_data {
+	/* rc reflects the cumulative failure state */
+	int rc;
+	const char *hook_name;
+	const char *hook_path;
+	struct run_hooks_opt *options;
+};
 
 /*
  * Returns the path to the hook file, or NULL if the hook is missing
@@ -13,4 +39,13 @@ const char *find_hook(const char *name);
  */
 int hook_exists(const char *hookname);
 
+/**
+ * Takes a `hook_name`, resolves it to a path with find_hook(), and
+ * runs the hook for you with the options specified in "struct
+ * run_hooks opt". Will free memory associated with the "struct run_hooks_opt".
+ *
+ * Returns the status code of the run hook, or a negative value on
+ * error().
+ */
+int run_hooks_opt(const char *hook_name, struct run_hooks_opt *options);
 #endif
diff --git a/t/t1800-hook.sh b/t/t1800-hook.sh
new file mode 100755
index 00000000000..3aea1b105f0
--- /dev/null
+++ b/t/t1800-hook.sh
@@ -0,0 +1,129 @@
+#!/bin/sh
+
+test_description='git-hook command'
+
+TEST_PASSES_SANITIZE_LEAK=true
+. ./test-lib.sh
+
+test_expect_success 'git hook usage' '
+	test_expect_code 129 git hook &&
+	test_expect_code 129 git hook run &&
+	test_expect_code 129 git hook run -h &&
+	test_expect_code 129 git hook run --unknown 2>err &&
+	grep "unknown option" err
+'
+
+test_expect_success 'git hook run: nonexistent hook' '
+	cat >stderr.expect <<-\EOF &&
+	error: cannot find a hook named test-hook
+	EOF
+	test_expect_code 1 git hook run test-hook 2>stderr.actual &&
+	test_cmp stderr.expect stderr.actual
+'
+
+test_expect_success 'git hook run: basic' '
+	write_script .git/hooks/test-hook <<-EOF &&
+	echo Test hook
+	EOF
+
+	cat >expect <<-\EOF &&
+	Test hook
+	EOF
+	git hook run test-hook 2>actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'git hook run: stdout and stderr both write to our stderr' '
+	write_script .git/hooks/test-hook <<-EOF &&
+	echo >&1 Will end up on stderr
+	echo >&2 Will end up on stderr
+	EOF
+
+	cat >stderr.expect <<-\EOF &&
+	Will end up on stderr
+	Will end up on stderr
+	EOF
+	git hook run test-hook >stdout.actual 2>stderr.actual &&
+	test_cmp stderr.expect stderr.actual &&
+	test_must_be_empty stdout.actual
+'
+
+test_expect_success 'git hook run: exit codes are passed along' '
+	write_script .git/hooks/test-hook <<-EOF &&
+	exit 1
+	EOF
+
+	test_expect_code 1 git hook run test-hook &&
+
+	write_script .git/hooks/test-hook <<-EOF &&
+	exit 2
+	EOF
+
+	test_expect_code 2 git hook run test-hook &&
+
+	write_script .git/hooks/test-hook <<-EOF &&
+	exit 128
+	EOF
+
+	test_expect_code 128 git hook run test-hook &&
+
+	write_script .git/hooks/test-hook <<-EOF &&
+	exit 129
+	EOF
+
+	test_expect_code 129 git hook run test-hook
+'
+
+test_expect_success 'git hook run arg u ments without -- is not allowed' '
+	test_expect_code 129 git hook run test-hook arg u ments
+'
+
+test_expect_success 'git hook run -- pass arguments' '
+	write_script .git/hooks/test-hook <<-\EOF &&
+	echo $1
+	echo $2
+	EOF
+
+	cat >expect <<-EOF &&
+	arg
+	u ments
+	EOF
+
+	git hook run test-hook -- arg "u ments" 2>actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'git hook run -- out-of-repo runs excluded' '
+	write_script .git/hooks/test-hook <<-EOF &&
+	echo Test hook
+	EOF
+
+	nongit test_must_fail git hook run test-hook
+'
+
+test_expect_success 'git -c core.hooksPath=<PATH> hook run' '
+	mkdir my-hooks &&
+	write_script my-hooks/test-hook <<-\EOF &&
+	echo Hook ran $1 >>actual
+	EOF
+
+	cat >expect <<-\EOF &&
+	Test hook
+	Hook ran one
+	Hook ran two
+	Hook ran three
+	Hook ran four
+	EOF
+
+	# Test various ways of specifying the path. See also
+	# t1350-config-hooks-path.sh
+	>actual &&
+	git hook run test-hook -- ignored 2>>actual &&
+	git -c core.hooksPath=my-hooks hook run test-hook -- one 2>>actual &&
+	git -c core.hooksPath=my-hooks/ hook run test-hook -- two 2>>actual &&
+	git -c core.hooksPath="$PWD/my-hooks" hook run test-hook -- three 2>>actual &&
+	git -c core.hooksPath="$PWD/my-hooks/" hook run test-hook -- four 2>>actual &&
+	test_cmp expect actual
+'
+
+test_done
-- 
2.34.0.831.gd33babec0d1


  reply	other threads:[~2021-11-23 11:46 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  9:43 [PATCH v2 00/13] hook.[ch]: new library to run hooks + simple hook conversion Ævar Arnfjörð Bjarmason
2021-10-15  9:43 ` [PATCH v2 01/13] hook: add 'run' subcommand Ævar Arnfjörð Bjarmason
2021-10-15 16:24   ` Emily Shaffer
2021-10-15 17:53     ` Eric Sunshine
2021-10-19 23:08     ` Ævar Arnfjörð Bjarmason
2021-10-15  9:43 ` [PATCH v2 02/13] gc: use hook library for pre-auto-gc hook Ævar Arnfjörð Bjarmason
2021-10-15 16:24   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 03/13] rebase: convert pre-rebase to use hook.h Ævar Arnfjörð Bjarmason
2021-10-15 16:25   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 04/13] am: convert applypatch " Ævar Arnfjörð Bjarmason
2021-10-15 16:25   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 05/13] hooks: convert 'post-checkout' hook to hook library Ævar Arnfjörð Bjarmason
2021-10-15 16:25   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 06/13] merge: convert post-merge to use hook.h Ævar Arnfjörð Bjarmason
2021-10-15 16:26   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 07/13] git hook run: add an --ignore-missing flag Ævar Arnfjörð Bjarmason
2021-10-15 16:26   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 08/13] send-email: use 'git hook run' for 'sendemail-validate' Ævar Arnfjörð Bjarmason
2021-10-15 17:07   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 09/13] git-p4: use 'git hook' to run hooks Ævar Arnfjörð Bjarmason
2021-10-15 17:08   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 10/13] commit: convert {pre-commit,prepare-commit-msg} hook to hook.h Ævar Arnfjörð Bjarmason
2021-10-15 17:15   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 11/13] read-cache: convert post-index-change to use hook.h Ævar Arnfjörð Bjarmason
2021-10-15 17:17   ` Emily Shaffer
2021-10-15  9:43 ` [PATCH v2 12/13] receive-pack: convert push-to-checkout hook to hook.h Ævar Arnfjörð Bjarmason
2021-10-15  9:43 ` [PATCH v2 13/13] run-command: remove old run_hook_{le,ve}() hook API Ævar Arnfjörð Bjarmason
2021-10-15 17:18   ` Emily Shaffer
2021-10-15 16:23 ` [PATCH v2 00/13] hook.[ch]: new library to run hooks + simple hook conversion Emily Shaffer
2021-10-16  0:58 ` Junio C Hamano
2021-10-16  5:22   ` Eric Sunshine
2021-10-16  5:47   ` Ævar Arnfjörð Bjarmason
2021-10-16 18:04     ` Junio C Hamano
2021-10-16 18:10       ` Ævar Arnfjörð Bjarmason
2021-10-19 23:20 ` [PATCH v3 " Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 01/13] hook: add 'run' subcommand Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 02/13] gc: use hook library for pre-auto-gc hook Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 03/13] rebase: convert pre-rebase to use hook.h Ævar Arnfjörð Bjarmason
2021-10-29  5:48     ` Junio C Hamano
2021-10-19 23:20   ` [PATCH v3 04/13] am: convert applypatch " Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 05/13] hooks: convert 'post-checkout' hook to hook library Ævar Arnfjörð Bjarmason
2021-10-29  5:55     ` Junio C Hamano
2021-10-19 23:20   ` [PATCH v3 06/13] merge: convert post-merge to use hook.h Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 07/13] git hook run: add an --ignore-missing flag Ævar Arnfjörð Bjarmason
2021-10-29  5:59     ` Junio C Hamano
2021-10-19 23:20   ` [PATCH v3 08/13] send-email: use 'git hook run' for 'sendemail-validate' Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 09/13] git-p4: use 'git hook' to run hooks Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 10/13] commit: convert {pre-commit,prepare-commit-msg} hook to hook.h Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 11/13] read-cache: convert post-index-change to use hook.h Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 12/13] receive-pack: convert push-to-checkout hook to hook.h Ævar Arnfjörð Bjarmason
2021-10-19 23:20   ` [PATCH v3 13/13] run-command: remove old run_hook_{le,ve}() hook API Ævar Arnfjörð Bjarmason
2021-10-29  6:27   ` [PATCH v3 00/13] hook.[ch]: new library to run hooks + simple hook conversion Junio C Hamano
2021-11-01 18:56   ` [PATCH v4 00/17] " Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 01/17] hook: add 'run' subcommand Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 02/17] hook API: add a run_hooks() wrapper Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 03/17] gc: use hook library for pre-auto-gc hook Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 04/17] am: convert {pre,post}-applypatch to use hook.h Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 05/17] hook API: add a run_hooks_l() wrapper Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 06/17] rebase: convert pre-rebase to use hook.h Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 07/17] am: convert applypatch-msg " Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 08/17] merge: convert post-merge " Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 09/17] hooks: convert non-worktree 'post-checkout' hook to hook library Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 10/17] hooks: convert worktree " Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 11/17] git hook run: add an --ignore-missing flag Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 12/17] send-email: use 'git hook run' for 'sendemail-validate' Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 13/17] git-p4: use 'git hook' to run hooks Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 14/17] commit: convert {pre-commit,prepare-commit-msg} hook to hook.h Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 15/17] read-cache: convert post-index-change to use hook.h Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 16/17] receive-pack: convert push-to-checkout hook to hook.h Ævar Arnfjörð Bjarmason
2021-11-01 18:56     ` [PATCH v4 17/17] run-command: remove old run_hook_{le,ve}() hook API Ævar Arnfjörð Bjarmason
2021-11-23 11:45     ` [PATCH v5 00/17] hook.[ch]: new library to run hooks + simple hook conversion Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` Ævar Arnfjörð Bjarmason [this message]
2021-11-23 11:46       ` [PATCH v5 02/17] hook API: add a run_hooks() wrapper Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 03/17] gc: use hook library for pre-auto-gc hook Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 04/17] am: convert {pre,post}-applypatch to use hook.h Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 05/17] hook API: add a run_hooks_l() wrapper Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 06/17] rebase: convert pre-rebase to use hook.h Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 07/17] am: convert applypatch-msg " Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 08/17] merge: convert post-merge " Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 09/17] hooks: convert non-worktree 'post-checkout' hook to hook library Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 10/17] hooks: convert worktree " Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 11/17] git hook run: add an --ignore-missing flag Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 12/17] send-email: use 'git hook run' for 'sendemail-validate' Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 13/17] git-p4: use 'git hook' to run hooks Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 14/17] commit: convert {pre-commit,prepare-commit-msg} hook to hook.h Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 15/17] read-cache: convert post-index-change to use hook.h Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 16/17] receive-pack: convert push-to-checkout hook to hook.h Ævar Arnfjörð Bjarmason
2021-11-23 11:46       ` [PATCH v5 17/17] run-command: remove old run_hook_{le,ve}() hook API Ævar Arnfjörð Bjarmason
2021-12-22  3:59       ` [PATCH v6 00/17] hook.[ch]: new library to run hooks + simple hook conversion Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 01/17] hook: add 'run' subcommand Ævar Arnfjörð Bjarmason
2022-01-07 21:53           ` Emily Shaffer
2022-01-07 23:08             ` Junio C Hamano
2021-12-22  3:59         ` [PATCH v6 02/17] hook API: add a run_hooks() wrapper Ævar Arnfjörð Bjarmason
2022-01-06 18:53           ` Glen Choo
2021-12-22  3:59         ` [PATCH v6 03/17] gc: use hook library for pre-auto-gc hook Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 04/17] am: convert {pre,post}-applypatch to use hook.h Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 05/17] hook API: add a run_hooks_l() wrapper Ævar Arnfjörð Bjarmason
2022-01-06 18:56           ` Glen Choo
2022-01-07 21:56           ` Emily Shaffer
2021-12-22  3:59         ` [PATCH v6 06/17] rebase: convert pre-rebase to use hook.h Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 07/17] am: convert applypatch-msg " Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 08/17] merge: convert post-merge " Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 09/17] hooks: convert non-worktree 'post-checkout' hook to hook library Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 10/17] hooks: convert worktree " Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 11/17] git hook run: add an --ignore-missing flag Ævar Arnfjörð Bjarmason
2022-01-06 19:33           ` Glen Choo
2021-12-22  3:59         ` [PATCH v6 12/17] send-email: use 'git hook run' for 'sendemail-validate' Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 13/17] git-p4: use 'git hook' to run hooks Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 14/17] commit: convert {pre-commit,prepare-commit-msg} hook to hook.h Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 15/17] read-cache: convert post-index-change to use hook.h Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 16/17] receive-pack: convert push-to-checkout hook to hook.h Ævar Arnfjörð Bjarmason
2021-12-22  3:59         ` [PATCH v6 17/17] run-command: remove old run_hook_{le,ve}() hook API Ævar Arnfjörð Bjarmason
2022-01-06 18:47         ` [PATCH v6 00/17] hook.[ch]: new library to run hooks + simple hook conversion Glen Choo
2022-01-07 21:48         ` Emily Shaffer
2022-01-07 22:01           ` Emily Shaffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-v5-01.17-4ca52feebb8-20211123T114206Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=phillip.wood123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).