#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "bundle-uri.h"
#include "bundle.h"
#include "copy.h"
#include "gettext.h"
#include "refs.h"
#include "run-command.h"
#include "hashmap.h"
#include "pkt-line.h"
#include "config.h"
#include "fetch-pack.h"
#include "remote.h"
#include "trace2.h"
#include "object-store-ll.h"
static struct { … } heuristics[BUNDLE_HEURISTIC__COUNT] = …;
static int compare_bundles(const void *hashmap_cmp_fn_data UNUSED,
const struct hashmap_entry *he1,
const struct hashmap_entry *he2,
const void *id)
{ … }
void init_bundle_list(struct bundle_list *list)
{ … }
static int clear_remote_bundle_info(struct remote_bundle_info *bundle,
void *data UNUSED)
{ … }
void clear_bundle_list(struct bundle_list *list)
{ … }
int for_all_bundles_in_list(struct bundle_list *list,
bundle_iterator iter,
void *data)
{ … }
static int summarize_bundle(struct remote_bundle_info *info, void *data)
{ … }
void print_bundle_list(FILE *fp, struct bundle_list *list)
{ … }
static int bundle_list_update(const char *key, const char *value,
struct bundle_list *list)
{ … }
static int config_to_bundle_list(const char *key, const char *value,
const struct config_context *ctx UNUSED,
void *data)
{ … }
int bundle_uri_parse_config_format(const char *uri,
const char *filename,
struct bundle_list *list)
{ … }
static char *find_temp_filename(void)
{ … }
static int download_https_uri_to_file(const char *file, const char *uri)
{ … }
static int copy_uri_to_file(const char *filename, const char *uri)
{ … }
static int unbundle_from_file(struct repository *r, const char *file)
{ … }
struct bundle_list_context { … };
static int fetch_bundle_uri_internal(struct repository *r,
struct remote_bundle_info *bundle,
int depth,
struct bundle_list *list);
static int download_bundle_to_file(struct remote_bundle_info *bundle, void *data)
{ … }
struct bundles_for_sorting { … };
static int append_bundle(struct remote_bundle_info *bundle, void *data)
{ … }
static int compare_creation_token_decreasing(const void *va, const void *vb)
{ … }
static int fetch_bundles_by_token(struct repository *r,
struct bundle_list *list)
{ … }
static int download_bundle_list(struct repository *r,
struct bundle_list *local_list,
struct bundle_list *global_list,
int depth)
{ … }
static int fetch_bundle_list_in_config_format(struct repository *r,
struct bundle_list *global_list,
struct remote_bundle_info *bundle,
int depth)
{ … }
static int max_bundle_uri_depth = …;
static int fetch_bundle_uri_internal(struct repository *r,
struct remote_bundle_info *bundle,
int depth,
struct bundle_list *list)
{ … }
static int attempt_unbundle(struct remote_bundle_info *info, void *data)
{ … }
static int unbundle_all_bundles(struct repository *r,
struct bundle_list *list)
{ … }
static int unlink_bundle(struct remote_bundle_info *info, void *data UNUSED)
{ … }
int fetch_bundle_uri(struct repository *r, const char *uri,
int *has_heuristic)
{ … }
int fetch_bundle_list(struct repository *r, struct bundle_list *list)
{ … }
int bundle_uri_advertise(struct repository *r, struct strbuf *value UNUSED)
{ … }
static int config_to_packet_line(const char *key, const char *value,
const struct config_context *ctx UNUSED,
void *data)
{ … }
int bundle_uri_command(struct repository *r,
struct packet_reader *request)
{ … }
int bundle_uri_parse_line(struct bundle_list *list, const char *line)
{ … }