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

Function fetch_bundle_list

bundle-uri.c:893–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891}
892
893int fetch_bundle_list(struct repository *r, struct bundle_list *list)
894{
895 int result;
896 struct bundle_list global_list;
897
898 /*
899 * If the creationToken heuristic is used, then the URIs
900 * advertised by 'list' are not nested lists and instead
901 * direct bundles. We do not need to use global_list.
902 */
903 if (list->heuristic == BUNDLE_HEURISTIC_CREATIONTOKEN)
904 return fetch_bundles_by_token(r, list);
905
906 init_bundle_list(&global_list);
907
908 /* If a bundle is added to this global list, then it is required. */
909 global_list.mode = BUNDLE_MODE_ALL;
910
911 if ((result = download_bundle_list(r, list, &global_list, 0)))
912 goto cleanup;
913
914 if (list->heuristic == BUNDLE_HEURISTIC_CREATIONTOKEN)
915 result = fetch_bundles_by_token(r, list);
916 else
917 result = unbundle_all_bundles(r, &global_list);
918
919cleanup:
920 for_all_bundles_in_list(&global_list, unlink_bundle, NULL);
921 clear_bundle_list(&global_list);
922 return result;
923}
924
925/**
926 * API for serve.c.

Callers 1

cmd_cloneFunction · 0.85

Calls 6

fetch_bundles_by_tokenFunction · 0.85
init_bundle_listFunction · 0.85
download_bundle_listFunction · 0.85
unbundle_all_bundlesFunction · 0.85
for_all_bundles_in_listFunction · 0.85
clear_bundle_listFunction · 0.85

Tested by

no test coverage detected