#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "gettext.h"
#include "pack-revindex.h"
#include "object-file.h"
#include "object-store-ll.h"
#include "packfile.h"
#include "strbuf.h"
#include "trace2.h"
#include "parse.h"
#include "midx.h"
#include "csum-file.h"
struct revindex_entry { … };
static void sort_revindex(struct revindex_entry *entries, unsigned n, off_t max)
{ … }
static void create_pack_revindex(struct packed_git *p)
{ … }
static int create_pack_revindex_in_memory(struct packed_git *p)
{ … }
static char *pack_revindex_filename(struct packed_git *p)
{ … }
#define RIDX_HEADER_SIZE …
#define RIDX_MIN_SIZE …
struct revindex_header { … };
static int load_revindex_from_disk(char *revindex_name,
uint32_t num_objects,
const uint32_t **data_p, size_t *len_p)
{ … }
int load_pack_revindex_from_disk(struct packed_git *p)
{ … }
int load_pack_revindex(struct repository *r, struct packed_git *p)
{ … }
int verify_pack_revindex(struct packed_git *p)
{ … }
static int can_use_midx_ridx_chunk(struct multi_pack_index *m)
{ … }
int load_midx_revindex(struct multi_pack_index *m)
{ … }
int close_midx_revindex(struct multi_pack_index *m)
{ … }
int offset_to_pack_pos(struct packed_git *p, off_t ofs, uint32_t *pos)
{ … }
uint32_t pack_pos_to_index(struct packed_git *p, uint32_t pos)
{ … }
off_t pack_pos_to_offset(struct packed_git *p, uint32_t pos)
{ … }
uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos)
{ … }
struct midx_pack_key { … };
static int midx_pack_order_cmp(const void *va, const void *vb)
{ … }
static int midx_key_to_pack_pos(struct multi_pack_index *m,
struct midx_pack_key *key,
uint32_t *pos)
{ … }
int midx_to_pack_pos(struct multi_pack_index *m, uint32_t at, uint32_t *pos)
{ … }
int midx_pair_to_pack_pos(struct multi_pack_index *m, uint32_t pack_int_id,
off_t ofs, uint32_t *pos)
{ … }