MCPcopy Create free account
hub / github.com/git/git / cmd_bundle_list_heads

Function cmd_bundle_list_heads

builtin/bundle.c:169–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static 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);
189cleanup:
190 free(bundle_file);
191 bundle_header_release(&header);
192 return ret;
193}
194
195static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix,
196 struct repository *repo UNUSED) {

Callers

nothing calls this directly

Calls 4

parse_options_cmd_bundleFunction · 0.85
open_bundleFunction · 0.85
list_bundle_refsFunction · 0.85
bundle_header_releaseFunction · 0.85

Tested by

no test coverage detected