MCPcopy Create free account
hub / github.com/git/git / table_init_iter

Function table_init_iter

reftable/table.c:487–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487int table_init_iter(struct reftable_table *t,
488 struct reftable_iterator *it,
489 uint8_t typ)
490{
491 struct reftable_table_offsets *offs = table_offsets_for(t, typ);
492
493 if (offs->is_present) {
494 struct table_iter *ti;
495 REFTABLE_ALLOC_ARRAY(ti, 1);
496 if (!ti)
497 return REFTABLE_OUT_OF_MEMORY_ERROR;
498
499 table_iter_init(ti, t);
500 iterator_from_table_iter(it, ti);
501 } else {
502 iterator_set_empty(it);
503 }
504
505 return 0;
506}
507
508int reftable_table_init_ref_iterator(struct reftable_table *t,
509 struct reftable_iterator *it)

Calls 4

table_offsets_forFunction · 0.85
table_iter_initFunction · 0.85
iterator_from_table_iterFunction · 0.85
iterator_set_emptyFunction · 0.85

Tested by

no test coverage detected