#ifndef PACK_H
#define PACK_H
#include "object.h"
#include "csum-file.h"
struct packed_git;
struct pack_window;
struct repository;
#define PACK_SIGNATURE …
#define PACK_VERSION …
#define pack_version_ok(v) …
struct pack_header { … };
#define PACK_IDX_SIGNATURE …
struct pack_idx_option { … };
void reset_pack_idx_option(struct pack_idx_option *);
struct pack_idx_header { … };
struct pack_idx_entry { … };
struct progress;
verify_fn;
const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects, int nr_objects, const struct pack_idx_option *, const unsigned char *sha1);
int check_pack_crc(struct packed_git *p, struct pack_window **w_curs, off_t offset, off_t len, unsigned int nr);
int verify_pack_index(struct packed_git *);
int verify_pack(struct repository *, struct packed_git *, verify_fn fn, struct progress *, uint32_t);
off_t write_pack_header(struct hashfile *f, uint32_t);
void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t, unsigned char *, off_t);
char *index_pack_lockfile(int fd, int *is_well_formed);
struct ref;
void write_promisor_file(const char *promisor_name, struct ref **sought, int nr_sought);
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);
#define MAX_PACK_OBJECT_HEADER …
int encode_in_pack_object_header(unsigned char *hdr, int hdr_len,
enum object_type, uintmax_t);
#define PH_ERROR_EOF …
#define PH_ERROR_PACK_SIGNATURE …
#define PH_ERROR_PROTOCOL …
int read_pack_header(int fd, struct pack_header *);
struct packing_data;
struct hashfile *create_tmp_packfile(char **pack_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 rename_tmp_packfile_idx(struct strbuf *basename,
char **idx_tmp_name);
#endif