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

Function stack_try_add

reftable/stack.c:702–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702static int stack_try_add(struct reftable_stack *st,
703 int (*write_table)(struct reftable_writer *wr,
704 void *arg),
705 void *arg, unsigned flags)
706{
707 struct reftable_addition add;
708 int err;
709
710 err = reftable_stack_init_addition(&add, st, flags);
711 if (err < 0)
712 goto done;
713
714 err = reftable_addition_add(&add, write_table, arg);
715 if (err < 0)
716 goto done;
717
718 err = reftable_addition_commit(&add);
719done:
720 reftable_addition_close(&add);
721 return err;
722}
723
724int reftable_stack_add(struct reftable_stack *st,
725 int (*write)(struct reftable_writer *wr, void *arg),

Callers 1

reftable_stack_addFunction · 0.85

Calls 4

reftable_addition_addFunction · 0.85
reftable_addition_commitFunction · 0.85
reftable_addition_closeFunction · 0.85

Tested by

no test coverage detected