Peter Hagervall | baffc0e | 2007-07-15 01:14:45 +0200 | [diff] [blame] | 1 | #include "builtin.h" |
Elijah Newren | 0b027f6 | 2023-03-21 06:25:58 +0000 | [diff] [blame] | 2 | #include "abspath.h" |
Elijah Newren | f394e09 | 2023-03-21 06:25:54 +0000 | [diff] [blame] | 3 | #include "gettext.h" |
Elijah Newren | e38da48 | 2023-03-21 06:26:05 +0000 | [diff] [blame] | 4 | #include "setup.h" |
Jeff King | dbbcd44 | 2020-07-28 16:23:39 -0400 | [diff] [blame] | 5 | #include "strvec.h" |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 6 | #include "parse-options.h" |
Elijah Newren | b388633 | 2023-04-22 20:17:14 +0000 | [diff] [blame] | 7 | #include "pkt-line.h" |
Elijah Newren | d1cbe1e | 2023-04-22 20:17:20 +0000 | [diff] [blame] | 8 | #include "repository.h" |
Johannes Schindelin | 30415d5 | 2007-09-10 23:03:15 -0400 | [diff] [blame] | 9 | #include "bundle.h" |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 10 | |
| 11 | /* |
| 12 | * Basic handler for bundle files to connect repositories via sneakernet. |
| 13 | * Invocation must include action. |
| 14 | * This function can create a bundle or provide information on an existing |
Heikki Orsila | 34baebc | 2008-08-30 14:12:53 +0300 | [diff] [blame] | 15 | * bundle supporting "fetch", "pull", and "ls-remote". |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 16 | */ |
| 17 | |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 18 | #define BUILTIN_BUNDLE_CREATE_USAGE \ |
Jeff King | 8b95521 | 2023-03-04 05:55:13 -0500 | [diff] [blame] | 19 | N_("git bundle create [-q | --quiet | --progress]\n" \ |
Ævar Arnfjörð Bjarmason | a574867 | 2022-10-13 17:39:16 +0200 | [diff] [blame] | 20 | " [--version=<version>] <file> <git-rev-list-args>") |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 21 | #define BUILTIN_BUNDLE_VERIFY_USAGE \ |
Ævar Arnfjörð Bjarmason | a574867 | 2022-10-13 17:39:16 +0200 | [diff] [blame] | 22 | N_("git bundle verify [-q | --quiet] <file>") |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 23 | #define BUILTIN_BUNDLE_LIST_HEADS_USAGE \ |
| 24 | N_("git bundle list-heads <file> [<refname>...]") |
| 25 | #define BUILTIN_BUNDLE_UNBUNDLE_USAGE \ |
Ævar Arnfjörð Bjarmason | a574867 | 2022-10-13 17:39:16 +0200 | [diff] [blame] | 26 | N_("git bundle unbundle [--progress] <file> [<refname>...]") |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 27 | |
| 28 | static char const * const builtin_bundle_usage[] = { |
| 29 | BUILTIN_BUNDLE_CREATE_USAGE, |
| 30 | BUILTIN_BUNDLE_VERIFY_USAGE, |
| 31 | BUILTIN_BUNDLE_LIST_HEADS_USAGE, |
| 32 | BUILTIN_BUNDLE_UNBUNDLE_USAGE, |
| 33 | NULL, |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | static const char * const builtin_bundle_create_usage[] = { |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 37 | BUILTIN_BUNDLE_CREATE_USAGE, |
Ævar Arnfjörð Bjarmason | 968a04e | 2022-10-13 17:38:57 +0200 | [diff] [blame] | 38 | NULL |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | static const char * const builtin_bundle_verify_usage[] = { |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 42 | BUILTIN_BUNDLE_VERIFY_USAGE, |
Ævar Arnfjörð Bjarmason | 968a04e | 2022-10-13 17:38:57 +0200 | [diff] [blame] | 43 | NULL |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | static const char * const builtin_bundle_list_heads_usage[] = { |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 47 | BUILTIN_BUNDLE_LIST_HEADS_USAGE, |
Ævar Arnfjörð Bjarmason | 968a04e | 2022-10-13 17:38:57 +0200 | [diff] [blame] | 48 | NULL |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | static const char * const builtin_bundle_unbundle_usage[] = { |
Ævar Arnfjörð Bjarmason | f587d16 | 2022-10-13 17:38:58 +0200 | [diff] [blame] | 52 | BUILTIN_BUNDLE_UNBUNDLE_USAGE, |
Ævar Arnfjörð Bjarmason | 968a04e | 2022-10-13 17:38:57 +0200 | [diff] [blame] | 53 | NULL |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 54 | }; |
| 55 | |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 56 | static int parse_options_cmd_bundle(int argc, |
| 57 | const char **argv, |
| 58 | const char* prefix, |
| 59 | const char * const usagestr[], |
| 60 | const struct option options[], |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 61 | char **bundle_file) { |
Ævar Arnfjörð Bjarmason | e778ecb | 2022-12-27 19:39:09 +0100 | [diff] [blame] | 62 | argc = parse_options(argc, argv, NULL, options, usagestr, |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 63 | PARSE_OPT_STOP_AT_NON_OPTION); |
Ævar Arnfjörð Bjarmason | e778ecb | 2022-12-27 19:39:09 +0100 | [diff] [blame] | 64 | if (!argc) |
Ævar Arnfjörð Bjarmason | 6d5e9e5 | 2022-12-27 19:39:10 +0100 | [diff] [blame] | 65 | usage_msg_opt(_("need a <file> argument"), usagestr, options); |
Junio C Hamano | a8bfa99 | 2023-03-04 05:27:56 -0500 | [diff] [blame] | 66 | *bundle_file = prefix_filename_except_for_dash(prefix, argv[0]); |
Ævar Arnfjörð Bjarmason | e778ecb | 2022-12-27 19:39:09 +0100 | [diff] [blame] | 67 | return argc; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | static int cmd_bundle_create(int argc, const char **argv, const char *prefix) { |
René Scharfe | d089a06 | 2023-07-29 22:40:27 +0200 | [diff] [blame] | 71 | struct strvec pack_opts = STRVEC_INIT; |
brian m. carlson | c5aecfc | 2020-07-29 23:14:20 +0000 | [diff] [blame] | 72 | int version = -1; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 73 | int ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 74 | struct option options[] = { |
René Scharfe | d089a06 | 2023-07-29 22:40:27 +0200 | [diff] [blame] | 75 | OPT_PASSTHRU_ARGV('q', "quiet", &pack_opts, NULL, |
| 76 | N_("do not show progress meter"), |
| 77 | PARSE_OPT_NOARG), |
| 78 | OPT_PASSTHRU_ARGV(0, "progress", &pack_opts, NULL, |
| 79 | N_("show progress meter"), |
| 80 | PARSE_OPT_NOARG), |
| 81 | OPT_PASSTHRU_ARGV(0, "all-progress", &pack_opts, NULL, |
| 82 | N_("historical; same as --progress"), |
| 83 | PARSE_OPT_NOARG | PARSE_OPT_HIDDEN), |
| 84 | OPT_PASSTHRU_ARGV(0, "all-progress-implied", &pack_opts, NULL, |
| 85 | N_("historical; does nothing"), |
| 86 | PARSE_OPT_NOARG | PARSE_OPT_HIDDEN), |
brian m. carlson | c5aecfc | 2020-07-29 23:14:20 +0000 | [diff] [blame] | 87 | OPT_INTEGER(0, "version", &version, |
| 88 | N_("specify bundle format version")), |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 89 | OPT_END() |
| 90 | }; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 91 | char *bundle_file; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 92 | |
René Scharfe | d089a06 | 2023-07-29 22:40:27 +0200 | [diff] [blame] | 93 | if (isatty(STDERR_FILENO)) |
| 94 | strvec_push(&pack_opts, "--progress"); |
| 95 | strvec_push(&pack_opts, "--all-progress-implied"); |
| 96 | |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 97 | argc = parse_options_cmd_bundle(argc, argv, prefix, |
| 98 | builtin_bundle_create_usage, options, &bundle_file); |
| 99 | /* bundle internals use argv[1] as further parameters */ |
| 100 | |
| 101 | if (!startup_info->have_repository) |
| 102 | die(_("Need a repository to create a bundle.")); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 103 | ret = !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts, version); |
Ævar Arnfjörð Bjarmason | bf67dd8 | 2022-03-04 19:32:09 +0100 | [diff] [blame] | 104 | strvec_clear(&pack_opts); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 105 | free(bundle_file); |
| 106 | return ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 107 | } |
| 108 | |
Jeff King | bf8b1e0 | 2023-03-04 05:26:14 -0500 | [diff] [blame] | 109 | /* |
| 110 | * Similar to read_bundle_header(), but handle "-" as stdin. |
| 111 | */ |
| 112 | static int open_bundle(const char *path, struct bundle_header *header, |
| 113 | const char **name) |
| 114 | { |
| 115 | if (!strcmp(path, "-")) { |
| 116 | if (name) |
| 117 | *name = "<stdin>"; |
| 118 | return read_bundle_header_fd(0, header, "<stdin>"); |
| 119 | } |
| 120 | |
| 121 | if (name) |
| 122 | *name = path; |
| 123 | return read_bundle_header(path, header); |
| 124 | } |
| 125 | |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 126 | static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) { |
Ævar Arnfjörð Bjarmason | 10b635b | 2021-07-02 11:57:32 +0200 | [diff] [blame] | 127 | struct bundle_header header = BUNDLE_HEADER_INIT; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 128 | int bundle_fd = -1; |
Robin H. Johnson | e0eba64 | 2019-11-10 12:41:26 -0800 | [diff] [blame] | 129 | int quiet = 0; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 130 | int ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 131 | struct option options[] = { |
Robin H. Johnson | e0eba64 | 2019-11-10 12:41:26 -0800 | [diff] [blame] | 132 | OPT_BOOL('q', "quiet", &quiet, |
| 133 | N_("do not show bundle details")), |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 134 | OPT_END() |
| 135 | }; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 136 | char *bundle_file; |
Jeff King | bf8b1e0 | 2023-03-04 05:26:14 -0500 | [diff] [blame] | 137 | const char *name; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 138 | |
| 139 | argc = parse_options_cmd_bundle(argc, argv, prefix, |
| 140 | builtin_bundle_verify_usage, options, &bundle_file); |
| 141 | /* bundle internals use argv[1] as further parameters */ |
| 142 | |
Jeff King | bf8b1e0 | 2023-03-04 05:26:14 -0500 | [diff] [blame] | 143 | if ((bundle_fd = open_bundle(bundle_file, &header, &name)) < 0) { |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 144 | ret = 1; |
| 145 | goto cleanup; |
| 146 | } |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 147 | close(bundle_fd); |
Derrick Stolee | 89bd7fe | 2022-10-12 12:52:37 +0000 | [diff] [blame] | 148 | if (verify_bundle(the_repository, &header, |
Derrick Stolee | 70334fc | 2022-10-12 12:52:38 +0000 | [diff] [blame] | 149 | quiet ? VERIFY_BUNDLE_QUIET : VERIFY_BUNDLE_VERBOSE)) { |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 150 | ret = 1; |
| 151 | goto cleanup; |
| 152 | } |
| 153 | |
Jeff King | bf8b1e0 | 2023-03-04 05:26:14 -0500 | [diff] [blame] | 154 | fprintf(stderr, _("%s is okay\n"), name); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 155 | ret = 0; |
| 156 | cleanup: |
| 157 | free(bundle_file); |
Ævar Arnfjörð Bjarmason | 10b635b | 2021-07-02 11:57:32 +0200 | [diff] [blame] | 158 | bundle_header_release(&header); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 159 | return ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | static int cmd_bundle_list_heads(int argc, const char **argv, const char *prefix) { |
Ævar Arnfjörð Bjarmason | 10b635b | 2021-07-02 11:57:32 +0200 | [diff] [blame] | 163 | struct bundle_header header = BUNDLE_HEADER_INIT; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 164 | int bundle_fd = -1; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 165 | int ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 166 | struct option options[] = { |
| 167 | OPT_END() |
| 168 | }; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 169 | char *bundle_file; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 170 | |
| 171 | argc = parse_options_cmd_bundle(argc, argv, prefix, |
| 172 | builtin_bundle_list_heads_usage, options, &bundle_file); |
| 173 | /* bundle internals use argv[1] as further parameters */ |
| 174 | |
Jeff King | bf8b1e0 | 2023-03-04 05:26:14 -0500 | [diff] [blame] | 175 | if ((bundle_fd = open_bundle(bundle_file, &header, NULL)) < 0) { |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 176 | ret = 1; |
| 177 | goto cleanup; |
| 178 | } |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 179 | close(bundle_fd); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 180 | ret = !!list_bundle_refs(&header, argc, argv); |
| 181 | cleanup: |
| 182 | free(bundle_file); |
Ævar Arnfjörð Bjarmason | 10b635b | 2021-07-02 11:57:32 +0200 | [diff] [blame] | 183 | bundle_header_release(&header); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 184 | return ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix) { |
Ævar Arnfjörð Bjarmason | 10b635b | 2021-07-02 11:57:32 +0200 | [diff] [blame] | 188 | struct bundle_header header = BUNDLE_HEADER_INIT; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 189 | int bundle_fd = -1; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 190 | int ret; |
Ævar Arnfjörð Bjarmason | d941cc4 | 2021-09-05 09:34:45 +0200 | [diff] [blame] | 191 | int progress = isatty(2); |
| 192 | |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 193 | struct option options[] = { |
Ævar Arnfjörð Bjarmason | d941cc4 | 2021-09-05 09:34:45 +0200 | [diff] [blame] | 194 | OPT_BOOL(0, "progress", &progress, |
| 195 | N_("show progress meter")), |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 196 | OPT_END() |
| 197 | }; |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 198 | char *bundle_file; |
Ævar Arnfjörð Bjarmason | 7366096 | 2021-09-05 09:34:43 +0200 | [diff] [blame] | 199 | struct strvec extra_index_pack_args = STRVEC_INIT; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 200 | |
| 201 | argc = parse_options_cmd_bundle(argc, argv, prefix, |
| 202 | builtin_bundle_unbundle_usage, options, &bundle_file); |
| 203 | /* bundle internals use argv[1] as further parameters */ |
| 204 | |
Jeff King | bf8b1e0 | 2023-03-04 05:26:14 -0500 | [diff] [blame] | 205 | if ((bundle_fd = open_bundle(bundle_file, &header, NULL)) < 0) { |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 206 | ret = 1; |
| 207 | goto cleanup; |
| 208 | } |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 209 | if (!startup_info->have_repository) |
| 210 | die(_("Need a repository to unbundle.")); |
Ævar Arnfjörð Bjarmason | d941cc4 | 2021-09-05 09:34:45 +0200 | [diff] [blame] | 211 | if (progress) |
| 212 | strvec_pushl(&extra_index_pack_args, "-v", "--progress-title", |
| 213 | _("Unbundling objects"), NULL); |
Ævar Arnfjörð Bjarmason | 7366096 | 2021-09-05 09:34:43 +0200 | [diff] [blame] | 214 | ret = !!unbundle(the_repository, &header, bundle_fd, |
Derrick Stolee | 89bd7fe | 2022-10-12 12:52:37 +0000 | [diff] [blame] | 215 | &extra_index_pack_args, 0) || |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 216 | list_bundle_refs(&header, argc, argv); |
Ævar Arnfjörð Bjarmason | 10b635b | 2021-07-02 11:57:32 +0200 | [diff] [blame] | 217 | bundle_header_release(&header); |
Ævar Arnfjörð Bjarmason | db6bfb9 | 2021-07-02 11:57:30 +0200 | [diff] [blame] | 218 | cleanup: |
| 219 | free(bundle_file); |
| 220 | return ret; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 221 | } |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 222 | |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 223 | int cmd_bundle(int argc, const char **argv, const char *prefix) |
| 224 | { |
SZEDER Gábor | aef7d75 | 2022-08-19 18:04:01 +0200 | [diff] [blame] | 225 | parse_opt_subcommand_fn *fn = NULL; |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 226 | struct option options[] = { |
SZEDER Gábor | aef7d75 | 2022-08-19 18:04:01 +0200 | [diff] [blame] | 227 | OPT_SUBCOMMAND("create", &fn, cmd_bundle_create), |
| 228 | OPT_SUBCOMMAND("verify", &fn, cmd_bundle_verify), |
| 229 | OPT_SUBCOMMAND("list-heads", &fn, cmd_bundle_list_heads), |
| 230 | OPT_SUBCOMMAND("unbundle", &fn, cmd_bundle_unbundle), |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 231 | OPT_END() |
| 232 | }; |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 233 | |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 234 | argc = parse_options(argc, argv, prefix, options, builtin_bundle_usage, |
SZEDER Gábor | aef7d75 | 2022-08-19 18:04:01 +0200 | [diff] [blame] | 235 | 0); |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 236 | |
Robin H. Johnson | 73c3253 | 2019-11-10 12:41:24 -0800 | [diff] [blame] | 237 | packet_trace_identity("bundle"); |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 238 | |
SZEDER Gábor | aef7d75 | 2022-08-19 18:04:01 +0200 | [diff] [blame] | 239 | return !!fn(argc, argv, prefix); |
Johannes Schindelin | 2e0afaf | 2007-02-22 01:59:14 +0100 | [diff] [blame] | 240 | } |