Branch Coverage

deps/libgit2/src/libgit2/iterator.c
Criterion Covered Total %
branch 426 728 58.5


line true false branch
32 3 741 if (ignore_case)
37 3 741 iter->strcomp = ignore_case ? git__strcasecmp : git__strcmp;
38 3 741 iter->strncomp = ignore_case ? git__strncasecmp : git__strncmp;
39 3 741 iter->prefixcomp = ignore_case ? git__prefixcmp_icase : git__prefixcmp;
40 3 741 iter->entry_srch = ignore_case ? git_index_entry_isrch : git_index_entry_srch;
48 33 775 if (start && *start) {
33 0 if (start && *start) {
50 0 33 GIT_ERROR_CHECK_ALLOC(iter->start);
55 33 775 if (end && *end) {
33 0 if (end && *end) {
57 0 33 GIT_ERROR_CHECK_ALLOC(iter->end);
70 0 64 if (iter->start) {
76 0 64 if (iter->end) {
94 0 744 if (git_vector_init(&iter->pathlist, pathlist->count, NULL) < 0)
97 90 744 for (i = 0; i < pathlist->count; i++) {
98 0 90 if (!pathlist->strings[i])
101 0 90 if (git_vector_insert(&iter->pathlist, pathlist->strings[i]) < 0)
115 744 0 git_iterator_options *options = given_opts ? given_opts : &default_opts;
124 3 741 if ((iter->flags & GIT_ITERATOR_IGNORE_CASE) != 0) {
126 421 320 } else if ((iter->flags & GIT_ITERATOR_DONT_IGNORE_CASE) != 0) {
128 289 31 } else if (repo) {
131 0 289 if ((error = git_repository_index__weakptr(&index, iter->repo)) < 0)
136 0 289 if (ignore_case == 1)
145 711 33 if (repo &&
711 0 if (repo &&
146 711 0 (iter->flags & GIT_ITERATOR_PRECOMPOSE_UNICODE) == 0 &&
149 0 711 if (git_repository__configmap_lookup(&precompose, repo, GIT_CONFIGMAP_PRECOMPOSE) < 0)
151 0 711 else if (precompose)
155 167 577 if ((iter->flags & GIT_ITERATOR_DONT_AUTOEXPAND))
158 744 0 if ((error = iterator_range_init(iter, options->start, options->end)) < 0 ||
0 744 if ((error = iterator_range_init(iter, options->start, options->end)) < 0 ||
180 26 1440 if (iter->start == NULL || iter->started == true)
14 12 if (iter->start == NULL || iter->started == true)
188 12 0 if (iter->started)
197 0 0 if (is_submodule && iter->start_len && path_len == iter->start_len - 1 &&
0 0 if (is_submodule && iter->start_len && path_len == iter->start_len - 1 &&
0 0 if (is_submodule && iter->start_len && path_len == iter->start_len - 1 &&
0 0 if (is_submodule && iter->start_len && path_len == iter->start_len - 1 &&
205 0 0 if (path_len > 0 && path[path_len-1] == '/' &&
214 1440 26 if (iter->end == NULL)
216 0 26 else if (iter->ended)
232 1339 121 if (iter->pathlist.length == 0)
240 121 0 if (path_len && path[path_len-1] == '/')
6 115 if (path_len && path[path_len-1] == '/')
243 101 71 for (i = iter->pathlist_walk_idx; i < iter->pathlist.length; i++) {
247 101 0 if (p_len && p[p_len-1] == '/')
0 101 if (p_len && p[p_len-1] == '/')
258 68 33 if (cmp == 0) {
264 62 6 if (p[cmp_len] == '\0' &&
16 46 if (p[cmp_len] == '\0' &&
265 0 16 (path[cmp_len] == '\0' || path[cmp_len] == '/'))
272 0 22 if (p[cmp_len] == '/' && path[cmp_len] == '/')
0 0 if (p[cmp_len] == '/' && path[cmp_len] == '/')
277 29 4 else if (cmp < 0) {
283 4 0 else if (cmp > 0) {
306 0 127 if (iter->pathlist.length == 0)
318 34 93 if (error == 0) {
319 34 0 if (path_len && path[path_len-1] == '/')
0 34 if (path_len && path[path_len-1] == '/')
329 60 33 while ((p = git_vector_get(&iter->pathlist, idx)) != NULL) {
330 43 17 if (iter->prefixcomp(p, path) != 0)
334 0 17 GIT_ASSERT_WITH_RETVAL(p[path_len], ITERATOR_PATHLIST_NONE);
337 8 9 if (p[path_len] == '/') {
338 0 8 return (p[path_len+1] == '\0') ?
343 9 0 if (p[path_len] > '/')
358 17 0 if (e)
407 0 17 GIT_ERROR_CHECK_ALLOC(iter);
464 260 0 &iter->frames.ptr[iter->frames.size-2] : NULL;
470 1691 278 return iter->frames.size ? &iter->frames.ptr[iter->frames.size-1] : NULL;
476 8 0 return git_fs_path_cmp(
502 0 4 if (!c && a->parent_path != b->parent_path)
0 0 if (!c && a->parent_path != b->parent_path)
505 0 4 if (!c)
517 455 698 if (entry->parent_path)
522 526 627 if (git_tree_entry__is_tree(entry->tree_entry))
525 0 1153 if (git_str_oom(out))
544 324 260 new_frame = git_array_alloc(iter->frames);
324 0 new_frame = git_array_alloc(iter->frames);
545 0 584 GIT_ERROR_CHECK_ALLOC(new_frame);
547 0 584 if ((error = git_tree_dup(&dup, tree)) < 0)
553 260 324 if (frame_entry &&
0 260 if (frame_entry &&
558 8 576 tree_iterator_entry_sort_icase : NULL;
560 0 584 if ((error = git_vector_init(&new_frame->entries,
564 986 584 git_array_foreach(dup->entries, i, tree_entry) {
986 0 git_array_foreach(dup->entries, i, tree_entry) {
565 0 986 if ((new_entry = git_pool_malloc(&iter->entry_pool, 1)) == NULL) {
574 0 986 if ((error = git_vector_insert(&new_frame->entries, new_entry)) < 0)
578 576 8 git_vector_set_sorted(&new_frame->entries,
582 0 584 if (error < 0) {
584 0 0 git_array_pop(iter->frames);
609 0 4 while (parent_frame->next_idx < parent_frame->entries.length) {
612 0 0 if (strcasecmp(filename, entry->tree_entry->filename) != 0)
615 0 0 if ((error = git_tree_lookup(&tree,
619 0 0 if (git_vector_insert(&parent_frame->similar_trees, tree) < 0)
622 0 0 path = git_array_alloc(parent_frame->similar_paths);
0 0 path = git_array_alloc(parent_frame->similar_paths);
623 0 0 GIT_ERROR_CHECK_ALLOC(path);
627 0 0 if ((error = tree_iterator_compute_path(path, entry)) < 0)
630 0 0 GIT_ERROR_CHECK_ALLOC_ADD(&new_size,
0 0 GIT_ERROR_CHECK_ALLOC_ADD(&new_size,
634 0 0 git_array_foreach(tree->entries, i, tree_entry) {
0 0 git_array_foreach(tree->entries, i, tree_entry) {
636 0 0 GIT_ERROR_CHECK_ALLOC(new_entry);
641 0 0 if ((error = git_vector_insert(&frame->entries, new_entry)) < 0)
645 0 0 if (error)
661 260 0 if ((error = git_tree_lookup(&tree,
662 260 0 iter->base.repo, &entry->tree_entry->oid)) < 0 ||
673 4 256 if (iterator__ignore_case(&iter->base))
689 0 584 GIT_ASSERT(iter->frames.size);
691 584 0 frame = git_array_pop(iter->frames);
697 0 584 buf = git_array_pop(frame->similar_paths);
699 0 584 } while (buf != NULL);
703 0 584 git_vector_foreach(&frame->similar_trees, i, tree)
718 280 0 if (!iterator__has_been_accessed(i))
721 0 0 if (!iter->frames.size) {
759 278 1431 if ((frame = tree_iterator_current_frame(iter)) == NULL) {
765 538 893 if (frame->next_idx == frame->entries.length) {
766 0 538 if ((error = tree_iterator_frame_pop(iter)) < 0)
775 544 349 if (frame->next_idx == 0 && !git_vector_is_sorted(&frame->entries))
6 538 if (frame->next_idx == 0 && !git_vector_is_sorted(&frame->entries))
786 10 883 if (iterator__ignore_case(&iter->base) &&
4 6 if (iterator__ignore_case(&iter->base) &&
787 0 4 prev_entry &&
791 0 893 if ((error = tree_iterator_compute_path(&iter->entry_path, entry)) < 0)
795 0 893 if (!iterator_has_started(&iter->base, iter->entry_path.ptr, false))
799 6 887 if (iterator_has_ended(&iter->base, iter->entry_path.ptr)) {
805 20 867 if (!iterator_pathlist_next_is(&iter->base, iter->entry_path.ptr))
811 260 607 if (is_tree && !iterator__include_trees(iter)) {
260 0 if (is_tree && !iterator__include_trees(iter)) {
817 260 0 if (iterator__do_autoexpand(iter)) {
818 0 260 if ((error = tree_iterator_frame_push(iter, entry)) < 0)
830 0 607 if (is_tree && iterator__do_autoexpand(iter))
0 0 if (is_tree && iterator__do_autoexpand(iter))
836 891 0 if (out)
837 607 284 *out = (error == 0) ? &iter->entry : NULL;
850 0 0 if (out)
853 0 0 if ((frame = tree_iterator_current_frame(iter)) == NULL)
863 0 0 GIT_ASSERT(iterator__do_autoexpand(i) ^ (prev_entry != NULL));
865 0 0 if (prev_entry) {
866 0 0 if (!git_tree_entry__is_tree(prev_entry->tree_entry))
869 0 0 if ((error = tree_iterator_frame_push(iter, prev_entry)) < 0)
890 46 324 while (iter->frames.size)
905 324 0 if ((error = git_pool_init(&iter->entry_pool, sizeof(tree_iterator_entry))) < 0 ||
0 324 if ((error = git_pool_init(&iter->entry_pool, sizeof(tree_iterator_entry))) < 0 ||
951 17 284 if (tree == NULL)
955 0 284 GIT_ERROR_CHECK_ALLOC(iter);
960 284 0 if ((error = iterator_init_common(&iter->base,
961 284 0 git_tree_owner(tree), NULL, options)) < 0 ||
962 284 0 (error = git_tree_dup(&iter->root, tree)) < 0 ||
981 0 0 GIT_ASSERT(i->type == GIT_ITERATOR_TREE);
998 0 0 GIT_ASSERT(i->type == GIT_ITERATOR_TREE);
1002 0 0 GIT_ASSERT(depth < iter->frames.size);
1056 176 0 &iter->frames.ptr[iter->frames.size-2] : NULL;
1062 2020 202 return iter->frames.size ? &iter->frames.ptr[iter->frames.size-1] : NULL;
1069 243 0 NULL : frame->entries.contents[frame->next_idx-1];
1105 9 257 if (iter->tree) {
1110 1 8 if (error < 0 && error != GIT_ENOTFOUND)
0 1 if (error < 0 && error != GIT_ENOTFOUND)
1113 8 1 if (!error) {
1119 266 0 if (!is_submodule && iter->base.index) {
206 60 if (!is_submodule && iter->base.index) {
1125 206 0 if (error < 0 && error != GIT_ENOTFOUND)
0 206 if (error < 0 && error != GIT_ENOTFOUND)
1128 0 206 if (!error) {
1144 236 208 const char *path = frame_entry ? frame_entry->path : "";
1146 89 355 if (!iterator__honor_ignores(&iter->base))
1149 0 355 if (git_ignore__lookup(&new_frame->is_ignored,
1156 176 179 if (frame_entry) {
1165 176 0 if (new_frame->is_ignored <= GIT_IGNORE_NOTFOUND)
1175 355 89 if (iterator__honor_ignores(&iter->base))
1193 46 1165 if (iter->base.start_len) {
1200 6 40 if (cmp == 0) {
1201 1 5 if (iter->base.start[path_len] == '/')
1204 0 5 else if (iter->base.start[path_len] != '\0')
1208 20 26 if (cmp < 0)
1212 26 1165 if (iter->base.end_len) {
1215 14 12 if (cmp > 0)
1222 127 1050 if (iter->base.pathlist.length) {
1224 8 119 if (frame_entry && frame_entry->match != ITERATOR_PATHLIST_IS_PARENT)
0 8 if (frame_entry && frame_entry->match != ITERATOR_PATHLIST_IS_PARENT)
1229 85 42 if (match == ITERATOR_PATHLIST_NONE)
1233 42 0 if (match == ITERATOR_PATHLIST_IS_DIR ||
8 34 if (match == ITERATOR_PATHLIST_IS_DIR ||
1248 174 918 if (!iterator__ignore_dot_git(&iter->base))
1251 0 918 if ((len = path_len) < 4)
1254 0 918 if (path[len - 1] == '/')
1257 301 617 if (git__tolower(path[len - 1]) != 't' ||
137 164 if (git__tolower(path[len - 1]) != 't' ||
1258 137 0 git__tolower(path[len - 2]) != 'i' ||
1259 0 137 git__tolower(path[len - 3]) != 'g' ||
1263 0 137 return (len == 4 || path[len - 5] == '/');
0 0 return (len == 4 || path[len - 5] == '/');
1273 0 0 if (S_ISDIR(entry->st.st_mode)) {
1278 0 0 if (iter->base.type == GIT_ITERATOR_WORKDIR)
1282 0 0 if (!(error = git_str_joinpath(&fullpath, iter->root, entry->path)) &&
0 0 if (!(error = git_str_joinpath(&fullpath, iter->root, entry->path)) &&
1308 0 955 GIT_ERROR_CHECK_ALLOC_ADD(&entry_size,
0 955 GIT_ERROR_CHECK_ALLOC_ADD(&entry_size,
1310 0 955 GIT_ERROR_CHECK_ALLOC_ADD(&entry_size, entry_size, 2);
0 955 GIT_ERROR_CHECK_ALLOC_ADD(&entry_size, entry_size, 2);
1313 0 955 GIT_ERROR_CHECK_ALLOC(entry);
1321 266 689 if (S_ISDIR(entry->st.st_mode))
1326 0 955 if (iter->base.flags & GIT_ITERATOR_INCLUDE_HASH)
1329 955 0 if (!error)
1348 0 446 if (iter->frames.size == FILESYSTEM_MAX_DEPTH) {
1354 210 236 new_frame = git_array_alloc(iter->frames);
210 0 new_frame = git_array_alloc(iter->frames);
1355 0 446 GIT_ERROR_CHECK_ALLOC(new_frame);
1359 236 210 if (frame_entry)
1370 236 210 new_frame->path_len = frame_entry ? frame_entry->path_len : 0;
1373 2 444 if ((error = git_fs_path_diriter_init(
1379 2 442 if ((error = git_vector_init(&new_frame->entries, 64,
0 444 if ((error = git_vector_init(&new_frame->entries, 64,
1385 0 444 if ((error = git_pool_init(&new_frame->entry_pool, 1)) < 0)
1391 1211 444 while ((error = git_fs_path_diriter_next(&diriter)) == 0) {
1396 0 1211 if ((error = git_fs_path_diriter_fullpath(&path, &path_len, &diriter)) < 0)
1402 0 1211 if ((error = git_path_validate_str_length(iter->base.repo, &path_str)) < 0)
1405 0 1211 GIT_ASSERT(path_len > iter->root_len);
1416 119 1092 if (!filesystem_iterator_examine_path(&dir_expected, &pathlist_match,
1424 0 1092 if ((error = git_fs_path_diriter_stat(&statbuf, &diriter)) < 0) {
1426 0 0 if (error == GIT_ENOTFOUND)
1439 691 401 if (!S_ISDIR(statbuf.st_mode) &&
0 691 if (!S_ISDIR(statbuf.st_mode) &&
1440 0 0 !S_ISREG(statbuf.st_mode) &&
1441 0 0 !S_ISLNK(statbuf.st_mode) &&
1445 137 955 if (filesystem_iterator_is_dot_git(iter, path, path_len))
1449 266 689 if (S_ISDIR(statbuf.st_mode)) {
1452 0 266 if ((error = filesystem_iterator_is_submodule(&submodule,
1456 0 266 if (submodule)
1461 0 689 else if (dir_expected)
1464 0 955 if ((error = filesystem_iterator_entry_init(&entry,
1471 444 0 if (error == GIT_ITEROVER)
1478 2 444 if (error < 0)
1479 2 0 git_array_pop(iter->frames);
1490 0 444 GIT_ASSERT(iter->frames.size);
1492 444 0 frame = git_array_pop(iter->frames);
1530 0 877 if (iter->base.flags & GIT_ITERATOR_INCLUDE_HASH)
1543 167 73 if (!iterator__has_been_accessed(i))
1546 0 73 if (!iter->frames.size) {
1564 266 671 if (S_ISDIR(entry->st.st_mode)) {
1569 114 557 if (!iterator__descend_symlinks(iter) || !S_ISLNK(entry->st.st_mode)) {
114 0 if (!iterator__descend_symlinks(iter) || !S_ISLNK(entry->st.st_mode)) {
1574 0 0 if ((error = git_str_joinpath(&fullpath, iter->root, entry->path)) < 0 ||
0 0 if ((error = git_str_joinpath(&fullpath, iter->root, entry->path)) < 0 ||
1575 0 0 (error = git_path_validate_str_length(iter->base.repo, &fullpath)) < 0 ||
1600 202 1375 if ((frame = filesystem_iterator_current_frame(iter)) == NULL) {
1606 438 937 if (frame->next_idx == frame->entries.length) {
1615 0 937 if ((error = filesystem_iterator_is_dir(&is_dir, iter, entry)) < 0)
1618 266 671 if (is_dir) {
1619 60 206 if (iterator__do_autoexpand(iter)) {
1625 0 60 if (error == GIT_ENOTFOUND)
1627 0 60 else if (error < 0)
1631 60 206 if (!iterator__include_trees(iter))
1639 1079 0 if (out)
1640 877 202 *out = (error == 0) ? &iter->entry : NULL;
1653 176 0 if (out)
1656 0 176 if ((frame = filesystem_iterator_current_frame(iter)) == NULL)
1666 0 176 GIT_ASSERT(iterator__do_autoexpand(i) ^ (prev_entry != NULL));
1668 176 0 if (prev_entry) {
1669 176 0 if (prev_entry->st.st_mode != GIT_FILEMODE_COMMIT &&
0 176 if (prev_entry->st.st_mode != GIT_FILEMODE_COMMIT &&
1673 0 176 if ((error = filesystem_iterator_frame_push(iter, prev_entry)) < 0)
1688 6 0 if (i->type != GIT_ITERATOR_FS &&
0 6 if (i->type != GIT_ITERATOR_FS &&
1721 0 405 if (git_ignore__lookup(&iter->current_is_ignored,
1728 395 10 if (iter->current_is_ignored <= GIT_IGNORE_NOTFOUND) {
1737 405 11 if (iter->current_is_ignored == GIT_IGNORE_UNCHECKED)
1747 49 332 if (i->type != GIT_ITERATOR_WORKDIR)
1760 0 7 if (i->type != GIT_ITERATOR_WORKDIR)
1782 0 67 GIT_ASSERT(iterator__has_been_accessed(i));
1785 0 67 GIT_ASSERT(current_frame);
1788 0 67 GIT_ASSERT(current_entry);
1790 0 67 if ((error = git_iterator_current(&entry, i)) < 0)
1793 49 18 if (!S_ISDIR(entry->mode)) {
1794 1 48 if (filesystem_iterator_current_is_ignored(iter))
1801 0 18 if ((error = git_str_puts(&iter->tmp_buf, entry->path)) < 0)
1816 0 18 *status = current_entry->match == ITERATOR_PATHLIST_IS_PARENT ?
1819 36 0 while (entry && !iter->base.prefixcomp(entry->path, base)) {
35 1 while (entry && !iter->base.prefixcomp(entry->path, base)) {
1820 0 35 if (filesystem_iterator_current_is_ignored(iter)) {
1825 18 17 } else if (S_ISDIR(entry->mode)) {
1828 18 0 if (!error)
1832 0 0 else if (error == GIT_ENOTFOUND)
1844 0 0 if ((error = git_iterator_advance(&entry, i)) < 0)
1849 34 0 while (entry && !iter->base.prefixcomp(entry->path, base)) {
17 17 while (entry && !iter->base.prefixcomp(entry->path, base)) {
1850 1 16 if ((error = git_iterator_advance(&entry, i)) < 0)
1854 17 1 if (!error)
1862 6 210 while (iter->frames.size)
1877 179 31 if (iterator__honor_ignores(&iter->base) &&
0 179 if (iterator__honor_ignores(&iter->base) &&
1882 2 208 if ((error = filesystem_iterator_frame_push(iter, NULL)) < 0)
1904 167 37 if (iter->index)
1933 0 204 if (root == NULL)
1937 0 204 GIT_ERROR_CHECK_ALLOC(iter);
1945 0 204 GIT_ERROR_CHECK_ALLOC(iter->root);
1949 204 0 if (root_len == 0 || root[root_len-1] != '/') {
0 204 if (root_len == 0 || root[root_len-1] != '/') {
1956 0 204 if ((error = git_str_puts(&iter->current_path, iter->root)) < 0)
1959 0 204 if ((error = iterator_init_common(&iter->base, repo, index, options)) < 0)
1962 2 202 if (tree && (error = git_tree_dup(&iter->tree, tree)) < 0)
0 2 if (tree && (error = git_tree_dup(&iter->tree, tree)) < 0)
1965 167 37 if (index &&
0 167 if (index &&
1974 0 204 GIT_FS_PATH_DIR_PRECOMPOSE_UNICODE : 0);
1976 2 202 if ((error = filesystem_iterator_init(iter)) < 0)
2006 120 53 if (!repo_workdir) {
2007 0 120 if (git_repository__ensure_not_bare(repo, "scan working directory") < 0)
2014 173 0 if (given_opts)
2046 255 0 if (!iterator__has_been_accessed(i))
2049 0 0 if (iter->entry == NULL) {
2066 0 0 prev_path = iter->entry ? iter->entry->path : "";
2072 0 0 if ((dirsep = strchr(relative_path, '/')) == NULL)
2087 0 0 GIT_ASSERT(iterator__has_been_accessed(&iter->base));
2088 0 0 GIT_ASSERT(S_ISDIR(iter->entry->mode));
2093 0 0 if (++iter->next_idx >= iter->entries.length)
2098 0 0 if (iter->base.strncomp(iter->tree_buf.ptr, next_entry->path,
2118 256 573 if (iter->next_idx >= iter->entries.length) {
2124 0 573 if (iter->skip_tree) {
2132 0 573 if (!iterator_has_started(&iter->base, entry->path, is_submodule)) {
2137 0 573 if (iterator_has_ended(&iter->base, entry->path)) {
2143 55 518 if (!iterator_pathlist_next_is(&iter->base, entry->path)) {
2149 22 496 if (git_index_entry_is_conflict(entry) &&
22 0 if (git_index_entry_is_conflict(entry) &&
2172 496 256 iter->entry = (error == 0) ? entry : NULL;
2174 752 0 if (out)
2185 0 0 if (! S_ISDIR(iter->tree_entry.mode)) {
2186 0 0 if (out)
2205 0 0 if ((error = index_iterator_current(&entry, i)) < 0)
2208 0 0 if (S_ISDIR(entry->mode))
2264 0 256 if (index == NULL)
2268 0 256 GIT_ERROR_CHECK_ALLOC(iter);
2273 256 0 if ((error = iterator_init_common(&iter->base, repo, index, options)) < 0 ||
256 0 if ((error = iterator_init_common(&iter->base, repo, index, options)) < 0 ||
2274 256 0 (error = git_index_snapshot_new(&iter->entries, index)) < 0 ||
2278 0 256 git_vector_set_cmp(&iter->entries, iterator__ignore_case(&iter->base) ?
2296 0 64 if (iterator_reset_range(i, start, end) < 0)
2304 0 0 GIT_ASSERT(!iterator__has_been_accessed(i));
2311 94 761 if (iter == NULL)
2333 0 0 if ((error = git_iterator_current(&iterator_item, iterator)) < 0)
2336 0 0 if ((error = cb(iterator_item, data)) != 0)
2340 0 0 if ((error = git_iterator_advance(&iterator_item, iterator)) < 0)
2343 0 0 if ((error = cb(iterator_item, data)) != 0)
2348 0 0 if (error == GIT_ITEROVER)
2369 0 22 GIT_ERROR_CHECK_ALLOC(iterator_item);
2370 0 22 GIT_ERROR_CHECK_ALLOC(cur_items);
2373 66 22 for (i = 0; i < cnt; i++) {
2376 0 66 if (error < 0 && error != GIT_ITEROVER)
0 0 if (error < 0 && error != GIT_ITEROVER)
2381 210 70 for (i = 0; i < cnt; i++)
2387 210 70 for (i = 0; i < cnt; i++) {
2388 70 140 if (iterator_item[i] == NULL)
2391 48 92 if (first_match == NULL) {
2397 1 91 if (path_diff < 0) {
2402 2 1 for (j = 0; j < i; j++)
2407 90 1 } else if (path_diff == 0) {
2413 22 48 if (first_match == NULL)
2416 0 48 if ((error = cb(cur_items, data)) != 0)
2420 144 48 for (i = 0; i < cnt; i++) {
2421 7 137 if (cur_items[i] == NULL)
2426 66 71 if (error < 0 && error != GIT_ITEROVER)
0 66 if (error < 0 && error != GIT_ITEROVER)
2435 22 0 if (error == GIT_ITEROVER)