git/midx.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "config.h"
#include "dir.h"
#include "hex.h"
#include "packfile.h"
#include "object-file.h"
#include "hash-lookup.h"
#include "midx.h"
#include "progress.h"
#include "trace2.h"
#include "chunk-format.h"
#include "pack-bitmap.h"
#include "pack-revindex.h"

int midx_checksum_valid(struct multi_pack_index *m);
void clear_midx_files_ext(const char *object_dir, const char *ext,
			  unsigned char *keep_hash);
int cmp_idx_or_pack_name(const char *idx_or_pack_name,
			 const char *idx_name);

const unsigned char *get_midx_checksum(struct multi_pack_index *m)
{}

void get_midx_filename(struct strbuf *out, const char *object_dir)
{}

void get_midx_filename_ext(struct strbuf *out, const char *object_dir,
			   const unsigned char *hash, const char *ext)
{}

static int midx_read_oid_fanout(const unsigned char *chunk_start,
				size_t chunk_size, void *data)
{}

static int midx_read_oid_lookup(const unsigned char *chunk_start,
				size_t chunk_size, void *data)
{}

static int midx_read_object_offsets(const unsigned char *chunk_start,
				    size_t chunk_size, void *data)
{}

#define MIDX_MIN_SIZE

struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local)
{}

void close_midx(struct multi_pack_index *m)
{}

int prepare_midx_pack(struct repository *r, struct multi_pack_index *m, uint32_t pack_int_id)
{}

#define MIDX_CHUNK_BITMAPPED_PACKS_WIDTH

int nth_bitmapped_pack(struct repository *r, struct multi_pack_index *m,
		       struct bitmapped_pack *bp, uint32_t pack_int_id)
{}

int bsearch_midx(const struct object_id *oid, struct multi_pack_index *m, uint32_t *result)
{}

struct object_id *nth_midxed_object_oid(struct object_id *oid,
					struct multi_pack_index *m,
					uint32_t n)
{}

off_t nth_midxed_offset(struct multi_pack_index *m, uint32_t pos)
{}

uint32_t nth_midxed_pack_int_id(struct multi_pack_index *m, uint32_t pos)
{}

int fill_midx_entry(struct repository *r,
		    const struct object_id *oid,
		    struct pack_entry *e,
		    struct multi_pack_index *m)
{}

/* Match "foo.idx" against either "foo.pack" _or_ "foo.idx". */
int cmp_idx_or_pack_name(const char *idx_or_pack_name,
			 const char *idx_name)
{}

int midx_locate_pack(struct multi_pack_index *m, const char *idx_or_pack_name,
		     uint32_t *pos)
{}

int midx_contains_pack(struct multi_pack_index *m, const char *idx_or_pack_name)
{}

int midx_preferred_pack(struct multi_pack_index *m, uint32_t *pack_int_id)
{}

int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, int local)
{}

int midx_checksum_valid(struct multi_pack_index *m)
{}

struct clear_midx_data {};

static void clear_midx_file_ext(const char *full_path, size_t full_path_len UNUSED,
				const char *file_name, void *_data)
{}

void clear_midx_files_ext(const char *object_dir, const char *ext,
			  unsigned char *keep_hash)
{}

void clear_midx_file(struct repository *r)
{}

static int verify_midx_error;

__attribute__((format (printf, 1, 2)))
static void midx_report(const char *fmt, ...)
{}

struct pair_pos_vs_id
{};

static int compare_pair_pos_vs_id(const void *_a, const void *_b)
{}

/*
 * Limit calls to display_progress() for performance reasons.
 * The interval here was arbitrarily chosen.
 */
#define SPARSE_PROGRESS_INTERVAL
#define midx_display_sparse_progress(progress, n)

int verify_midx_file(struct repository *r, const char *object_dir, unsigned flags)
{}