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/bundle.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/bundle.c')
| -rw-r--r-- | builtin/bundle.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/builtin/bundle.c b/builtin/bundle.c index 127518c2a8..3f14754197 100644 --- a/builtin/bundle.c +++ b/builtin/bundle.c @@ -67,7 +67,8 @@ static int parse_options_cmd_bundle(int argc, return argc; } -static int cmd_bundle_create(int argc, const char **argv, const char *prefix) { +static int cmd_bundle_create(int argc, const char **argv, const char *prefix, + struct repository *repo UNUSED) { struct strvec pack_opts = STRVEC_INIT; int version = -1; int ret; @@ -123,7 +124,8 @@ static int open_bundle(const char *path, struct bundle_header *header, return read_bundle_header(path, header); } -static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) { +static int cmd_bundle_verify(int argc, const char **argv, const char *prefix, + struct repository *repo UNUSED) { struct bundle_header header = BUNDLE_HEADER_INIT; int bundle_fd = -1; int quiet = 0; @@ -164,7 +166,8 @@ cleanup: return ret; } -static int cmd_bundle_list_heads(int argc, const char **argv, const char *prefix) { +static int cmd_bundle_list_heads(int argc, const char **argv, const char *prefix, + struct repository *repo UNUSED) { struct bundle_header header = BUNDLE_HEADER_INIT; int bundle_fd = -1; int ret; @@ -189,7 +192,8 @@ cleanup: return ret; } -static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix) { +static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix, + struct repository *repo UNUSED) { struct bundle_header header = BUNDLE_HEADER_INIT; int bundle_fd = -1; int ret; @@ -231,7 +235,7 @@ cleanup: int cmd_bundle(int argc, const char **argv, const char *prefix, - struct repository *repo UNUSED) + struct repository *repo) { parse_opt_subcommand_fn *fn = NULL; struct option options[] = { @@ -247,5 +251,5 @@ int cmd_bundle(int argc, packet_trace_identity("bundle"); - return !!fn(argc, argv, prefix); + return !!fn(argc, argv, prefix, repo); } |
