git-2.22.0/bulk-checkin.c
/* Lazily create backing packfile for the state */
Lazily create backing packfile for the state
Lazily create backing packfile for the state
static void prepare_to_stream(struct bulk_checkin_state *state,
			      unsigned flags)
{
	if (!(flags & HASH_WRITE_OBJECT) || state->f)
		return;
	state->f = create_tmp_packfile(&state->pack_tmp_name);
	reset_pack_idx_option(&state->pack_idx_opts);
	state->offset = write_pack_header(state->f, 1);
	if (!state->offset)
		die_errno("unable to write pack header");
}
static void prepare_to_stream ( struct bulk_checkin_state * state , unsigned flags ) { if ( ! ( flags & HASH_WRITE_OBJECT ) || state -> f ) return ; state -> f = create_tmp_packfile ( & state -> pack_tmp_name ) ; reset_pack_idx_option ( & state -> pack_idx_opts ) ; state -> offset = write_pack_header ( state -> f , 1 ) ; if ( ! state -> offset ) die_errno ( " " ) ; }
Lazily create backing packfile for the state
Lazily create backing packfile for the state
/* Pretend we are going to write only one object */