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

Function overlay_ref_iterator_begin

refs/iterator.c:294–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294struct ref_iterator *overlay_ref_iterator_begin(
295 struct ref_iterator *front, struct ref_iterator *back)
296{
297 /*
298 * Optimization: if one of the iterators is empty, return the
299 * other one rather than incurring the overhead of wrapping
300 * them.
301 */
302 if (is_empty_ref_iterator(front)) {
303 ref_iterator_free(front);
304 return back;
305 } else if (is_empty_ref_iterator(back)) {
306 ref_iterator_free(back);
307 return front;
308 }
309
310 return merge_ref_iterator_begin(front, back, overlay_iterator_select, NULL);
311}
312
313struct prefix_ref_iterator {
314 struct ref_iterator base;

Callers 1

files_ref_iterator_beginFunction · 0.85

Calls 3

is_empty_ref_iteratorFunction · 0.85
ref_iterator_freeFunction · 0.85
merge_ref_iterator_beginFunction · 0.85

Tested by

no test coverage detected