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

Function do_for_each_ref_iterator

refs/iterator.c:425–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425int do_for_each_ref_iterator(struct ref_iterator *iter,
426 refs_for_each_cb fn, void *cb_data)
427{
428 int retval = 0, ok;
429
430 while ((ok = ref_iterator_advance(iter)) == ITER_OK) {
431 retval = fn(&iter->ref, cb_data);
432 if (retval)
433 goto out;
434 }
435
436out:
437 if (ok == ITER_ERROR)
438 retval = -1;
439 ref_iterator_free(iter);
440 return retval;
441}

Callers 4

do_filter_refsFunction · 0.85
refs_for_each_ref_extFunction · 0.85
refs_for_each_reflogFunction · 0.85

Calls 2

ref_iterator_advanceFunction · 0.85
ref_iterator_freeFunction · 0.85

Tested by

no test coverage detected