diff options
Diffstat (limited to 'builtin/bundle.c')
-rw-r--r-- | builtin/bundle.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/builtin/bundle.c b/builtin/bundle.c index f049d27a14..ea6948110b 100644 --- a/builtin/bundle.c +++ b/builtin/bundle.c @@ -1,5 +1,5 @@ #include "builtin.h" -#include "argv-array.h" +#include "strvec.h" #include "parse-options.h" #include "cache.h" #include "bundle.h" @@ -59,7 +59,8 @@ static int parse_options_cmd_bundle(int argc, static int cmd_bundle_create(int argc, const char **argv, const char *prefix) { int all_progress_implied = 0; int progress = isatty(STDERR_FILENO); - struct argv_array pack_opts; + struct strvec pack_opts; + int version = -1; struct option options[] = { OPT_SET_INT('q', "quiet", &progress, @@ -71,6 +72,8 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) { OPT_BOOL(0, "all-progress-implied", &all_progress_implied, N_("similar to --all-progress when progress meter is shown")), + OPT_INTEGER(0, "version", &version, + N_("specify bundle format version")), OPT_END() }; const char* bundle_file; @@ -79,19 +82,19 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) { builtin_bundle_create_usage, options, &bundle_file); /* bundle internals use argv[1] as further parameters */ - argv_array_init(&pack_opts); + strvec_init(&pack_opts); if (progress == 0) - argv_array_push(&pack_opts, "--quiet"); + strvec_push(&pack_opts, "--quiet"); else if (progress == 1) - argv_array_push(&pack_opts, "--progress"); + strvec_push(&pack_opts, "--progress"); else if (progress == 2) - argv_array_push(&pack_opts, "--all-progress"); + strvec_push(&pack_opts, "--all-progress"); if (progress && all_progress_implied) - argv_array_push(&pack_opts, "--all-progress-implied"); + strvec_push(&pack_opts, "--all-progress-implied"); if (!startup_info->have_repository) die(_("Need a repository to create a bundle.")); - return !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts); + return !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts, version); } static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) { |