#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "bulk-checkin.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "repository.h"
#include "csum-file.h"
#include "pack.h"
#include "strbuf.h"
#include "tmp-objdir.h"
#include "packfile.h"
#include "object-file.h"
#include "object-store-ll.h"
static int odb_transaction_nesting;
static struct tmp_objdir *bulk_fsync_objdir;
static struct bulk_checkin_packfile { … } bulk_checkin_packfile;
static void finish_tmp_packfile(struct strbuf *basename,
const char *pack_tmp_name,
struct pack_idx_entry **written_list,
uint32_t nr_written,
struct pack_idx_option *pack_idx_opts,
unsigned char hash[])
{ … }
static void flush_bulk_checkin_packfile(struct bulk_checkin_packfile *state)
{ … }
static void flush_batch_fsync(void)
{ … }
static int already_written(struct bulk_checkin_packfile *state, struct object_id *oid)
{ … }
static int stream_blob_to_pack(struct bulk_checkin_packfile *state,
git_hash_ctx *ctx, off_t *already_hashed_to,
int fd, size_t size, const char *path,
unsigned flags)
{ … }
static void prepare_to_stream(struct bulk_checkin_packfile *state,
unsigned flags)
{ … }
static int deflate_blob_to_pack(struct bulk_checkin_packfile *state,
struct object_id *result_oid,
int fd, size_t size,
const char *path, unsigned flags)
{ … }
void prepare_loose_object_bulk_checkin(void)
{ … }
void fsync_loose_object_bulk_checkin(int fd, const char *filename)
{ … }
int index_blob_bulk_checkin(struct object_id *oid,
int fd, size_t size,
const char *path, unsigned flags)
{ … }
void begin_odb_transaction(void)
{ … }
void flush_odb_transaction(void)
{ … }
void end_odb_transaction(void)
{ … }