#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "pack.h"
#include "csum-file.h"
#include "remote.h"
#include "chunk-format.h"
#include "object-file.h"
#include "pack-mtimes.h"
#include "pack-objects.h"
#include "pack-revindex.h"
#include "path.h"
#include "repository.h"
#include "strbuf.h"
void reset_pack_idx_option(struct pack_idx_option *opts)
{ … }
static int sha1_compare(const void *_a, const void *_b)
{ … }
static int cmp_uint32(const void *a_, const void *b_)
{ … }
static int need_large_offset(off_t offset, const struct pack_idx_option *opts)
{ … }
const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects,
int nr_objects, const struct pack_idx_option *opts,
const unsigned char *sha1)
{ … }
static int pack_order_cmp(const void *va, const void *vb, void *ctx)
{ … }
static void write_rev_header(struct hashfile *f)
{ … }
static void write_rev_index_positions(struct hashfile *f,
uint32_t *pack_order,
uint32_t nr_objects)
{ … }
static void write_rev_trailer(struct hashfile *f, const unsigned char *hash)
{ … }
char *write_rev_file(const char *rev_name,
struct pack_idx_entry **objects,
uint32_t nr_objects,
const unsigned char *hash,
unsigned flags)
{ … }
char *write_rev_file_order(const char *rev_name,
uint32_t *pack_order,
uint32_t nr_objects,
const unsigned char *hash,
unsigned flags)
{ … }
static void write_mtimes_header(struct hashfile *f)
{ … }
static void write_mtimes_objects(struct hashfile *f,
struct packing_data *to_pack,
struct pack_idx_entry **objects,
uint32_t nr_objects)
{ … }
static void write_mtimes_trailer(struct hashfile *f, const unsigned char *hash)
{ … }
static char *write_mtimes_file(struct packing_data *to_pack,
struct pack_idx_entry **objects,
uint32_t nr_objects,
const unsigned char *hash)
{ … }
off_t write_pack_header(struct hashfile *f, uint32_t nr_entries)
{ … }
void fixup_pack_header_footer(int pack_fd,
unsigned char *new_pack_hash,
const char *pack_name,
uint32_t object_count,
unsigned char *partial_pack_hash,
off_t partial_pack_offset)
{ … }
char *index_pack_lockfile(int ip_out, int *is_well_formed)
{ … }
int encode_in_pack_object_header(unsigned char *hdr, int hdr_len,
enum object_type type, uintmax_t size)
{ … }
struct hashfile *create_tmp_packfile(char **pack_tmp_name)
{ … }
static void rename_tmp_packfile(struct strbuf *name_prefix, const char *source,
const char *ext)
{ … }
void rename_tmp_packfile_idx(struct strbuf *name_buffer,
char **idx_tmp_name)
{ … }
void stage_tmp_packfiles(struct strbuf *name_buffer,
const char *pack_tmp_name,
struct pack_idx_entry **written_list,
uint32_t nr_written,
struct packing_data *to_pack,
struct pack_idx_option *pack_idx_opts,
unsigned char hash[],
char **idx_tmp_name)
{ … }
void write_promisor_file(const char *promisor_name, struct ref **sought, int nr_sought)
{ … }