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

Function pop_level

dir-iterator.c:145–157  ·  view source on GitHub ↗

* Pop the top level on the iter stack, releasing any resources associated * with it. Return the new value of iter->levels_nr. */

Source from the content-addressed store, hash-verified

143 * with it. Return the new value of iter->levels_nr.
144 */
145static int pop_level(struct dir_iterator_int *iter)
146{
147 struct dir_iterator_level *level =
148 &iter->levels[iter->levels_nr - 1];
149
150 if (level->dir && closedir(level->dir))
151 warning_errno("error closing directory '%s'",
152 iter->base.path.buf);
153 level->dir = NULL;
154 string_list_clear(&level->entries, 0);
155
156 return --iter->levels_nr;
157}
158
159/*
160 * Populate iter->base with the necessary information on the next iteration

Callers 1

dir_iterator_advanceFunction · 0.85

Calls 3

closedirFunction · 0.85
warning_errnoFunction · 0.85
string_list_clearFunction · 0.85

Tested by

no test coverage detected