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 /t/helper/test-parse-options.c | |
parent | 8c917be5d29c22d438a321baa585a87c026543b3 (diff) | |
parent | 6f33d8e255cb2ff738cd28eab22751efb7c2d6ce (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 't/helper/test-parse-options.c')
-rw-r--r-- | t/helper/test-parse-options.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c index 5250913d99..5da359486c 100644 --- a/t/helper/test-parse-options.c +++ b/t/helper/test-parse-options.c @@ -282,14 +282,16 @@ int cmd__parse_options_flags(int argc, const char **argv) return parse_options_flags__cmd(argc, argv, test_flags); } -static int subcmd_one(int argc, const char **argv, const char *prefix UNUSED) +static int subcmd_one(int argc, const char **argv, const char *prefix UNUSED, + struct repository *repo UNUSED) { printf("fn: subcmd_one\n"); print_args(argc, argv); return 0; } -static int subcmd_two(int argc, const char **argv, const char *prefix UNUSED) +static int subcmd_two(int argc, const char **argv, const char *prefix UNUSED, + struct repository *repo UNUSED) { printf("fn: subcmd_two\n"); print_args(argc, argv); @@ -319,7 +321,7 @@ static int parse_subcommand__cmd(int argc, const char **argv, printf("opt: %d\n", opt); - return fn(argc, argv, NULL); + return fn(argc, argv, NULL, NULL); } int cmd__parse_subcommand(int argc, const char **argv) |