| 167 | } |
| 168 | |
| 169 | static int cmd_bundle_list_heads(int argc, const char **argv, const char *prefix, |
| 170 | struct repository *repo UNUSED) { |
| 171 | struct bundle_header header = BUNDLE_HEADER_INIT; |
| 172 | int bundle_fd = -1; |
| 173 | int ret; |
| 174 | struct option options[] = { |
| 175 | OPT_END() |
| 176 | }; |
| 177 | char *bundle_file; |
| 178 | |
| 179 | argc = parse_options_cmd_bundle(argc, argv, prefix, |
| 180 | builtin_bundle_list_heads_usage, options, &bundle_file); |
| 181 | /* bundle internals use argv[1] as further parameters */ |
| 182 | |
| 183 | if ((bundle_fd = open_bundle(bundle_file, &header, NULL)) < 0) { |
| 184 | ret = 1; |
| 185 | goto cleanup; |
| 186 | } |
| 187 | close(bundle_fd); |
| 188 | ret = !!list_bundle_refs(&header, argc, argv); |
| 189 | cleanup: |
| 190 | free(bundle_file); |
| 191 | bundle_header_release(&header); |
| 192 | return ret; |
| 193 | } |
| 194 | |
| 195 | static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix, |
| 196 | struct repository *repo UNUSED) { |
nothing calls this directly
no test coverage detected