MCPcopy Index your code
hub / github.com/git/git / reftable_addition_close

Function reftable_addition_close

reftable/stack.c:638–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636};
637
638static void reftable_addition_close(struct reftable_addition *add)
639{
640 struct reftable_buf nm = REFTABLE_BUF_INIT;
641 size_t i;
642
643 for (i = 0; i < add->new_tables_len; i++) {
644 if (!stack_filename(&nm, add->stack, add->new_tables[i]))
645 unlink(nm.buf);
646 reftable_free(add->new_tables[i]);
647 add->new_tables[i] = NULL;
648 }
649 reftable_free(add->new_tables);
650 add->new_tables = NULL;
651 add->new_tables_len = 0;
652 add->new_tables_cap = 0;
653
654 flock_release(&add->tables_list_lock);
655 reftable_buf_release(&nm);
656}
657
658static int reftable_stack_init_addition(struct reftable_addition *add,
659 struct reftable_stack *st,

Callers 4

stack_try_addFunction · 0.85
reftable_addition_commitFunction · 0.85

Calls 4

stack_filenameFunction · 0.85
reftable_freeFunction · 0.85
flock_releaseFunction · 0.85
reftable_buf_releaseFunction · 0.85

Tested by

no test coverage detected