summaryrefslogtreecommitdiff
path: root/builtin/hook.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-04 10:14:47 +0900
committerJunio C Hamano <gitster@pobox.com>2024-12-04 10:14:47 +0900
commit1e18cf4310b531cd5d943b9f9522292e7cc4d9e7 (patch)
tree5ecb42da0e9dd53ac0da0d2203207b3bef5caff2 /builtin/hook.c
parent8c917be5d29c22d438a321baa585a87c026543b3 (diff)
parent6f33d8e255cb2ff738cd28eab22751efb7c2d6ce (diff)
Merge branch 'kn/pass-repo-to-builtin-sub-sub-commands'
Built-in Git subcommands are supplied the repository object to work with; they learned to do the same when they invoke sub-subcommands. * kn/pass-repo-to-builtin-sub-sub-commands: builtin: pass repository to sub commands
Diffstat (limited to 'builtin/hook.c')
-rw-r--r--builtin/hook.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/hook.c b/builtin/hook.c
index 367ef3e0b8..672d2e37e8 100644
--- a/builtin/hook.c
+++ b/builtin/hook.c
@@ -19,7 +19,8 @@ static const char * const builtin_hook_run_usage[] = {
NULL
};
-static int run(int argc, const char **argv, const char *prefix)
+static int run(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int i;
struct run_hooks_opt opt = RUN_HOOKS_OPT_INIT;
@@ -70,7 +71,7 @@ usage:
int cmd_hook(int argc,
const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
parse_opt_subcommand_fn *fn = NULL;
struct option builtin_hook_options[] = {
@@ -81,5 +82,5 @@ int cmd_hook(int argc,
argc = parse_options(argc, argv, NULL, builtin_hook_options,
builtin_hook_usage, 0);
- return fn(argc, argv, prefix);
+ return fn(argc, argv, prefix, repo);
}