#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,
const char *keep_hash);
void clear_incremental_midx_files_ext(const char *object_dir, const char *ext,
char **keep_hashes,
uint32_t hashes_nr);
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 …
static struct multi_pack_index *load_multi_pack_index_one(const char *object_dir,
const char *midx_name,
int local)
{ … }
void get_midx_chain_dirname(struct strbuf *buf, const char *object_dir)
{ … }
void get_midx_chain_filename(struct strbuf *buf, const char *object_dir)
{ … }
void get_split_midx_filename_ext(struct strbuf *buf, const char *object_dir,
const unsigned char *hash, const char *ext)
{ … }
static int open_multi_pack_index_chain(const char *chain_file,
int *fd, struct stat *st)
{ … }
static int add_midx_to_chain(struct multi_pack_index *midx,
struct multi_pack_index *midx_chain)
{ … }
static struct multi_pack_index *load_midx_chain_fd_st(const char *object_dir,
int local,
int fd, struct stat *st,
int *incomplete_chain)
{ … }
static struct multi_pack_index *load_multi_pack_index_chain(const char *object_dir,
int local)
{ … }
struct multi_pack_index *load_multi_pack_index(const char *object_dir,
int local)
{ … }
void close_midx(struct multi_pack_index *m)
{ … }
static uint32_t midx_for_object(struct multi_pack_index **_m, uint32_t pos)
{ … }
static uint32_t midx_for_pack(struct multi_pack_index **_m,
uint32_t pack_int_id)
{ … }
int prepare_midx_pack(struct repository *r, struct multi_pack_index *m,
uint32_t pack_int_id)
{ … }
struct packed_git *nth_midxed_pack(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_one_midx(const struct object_id *oid, struct multi_pack_index *m,
uint32_t *result)
{ … }
int bsearch_midx(const struct object_id *oid, struct multi_pack_index *m,
uint32_t *result)
{ … }
int midx_has_oid(struct multi_pack_index *m, const struct object_id *oid)
{ … }
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)
{ … }
int cmp_idx_or_pack_name(const char *idx_or_pack_name,
const char *idx_name)
{ … }
static int midx_contains_pack_1(struct multi_pack_index *m,
const char *idx_or_pack_name)
{ … }
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,
const char *keep_hash)
{ … }
void clear_incremental_midx_files_ext(const char *object_dir, const char *ext,
char **keep_hashes,
uint32_t hashes_nr)
{ … }
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)
{ … }
#define SPARSE_PROGRESS_INTERVAL …
#define midx_display_sparse_progress(progress, n) …
int verify_midx_file(struct repository *r, const char *object_dir, unsigned flags)
{ … }