diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-04 10:14:47 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 10:14:47 +0900 |
| commit | 1e18cf4310b531cd5d943b9f9522292e7cc4d9e7 (patch) | |
| tree | 5ecb42da0e9dd53ac0da0d2203207b3bef5caff2 /builtin/hook.c | |
| parent | Merge branch 'ps/bisect-double-free-fix' (diff) | |
| parent | builtin: pass repository to sub commands (diff) | |
| download | git-1e18cf4310b531cd5d943b9f9522292e7cc4d9e7.tar.gz git-1e18cf4310b531cd5d943b9f9522292e7cc4d9e7.zip | |
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.c | 7 |
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); } |
