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

Function next_directory_entry

dir-iterator.c:55–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53};
54
55static int next_directory_entry(DIR *dir, const char *path,
56 struct dirent **out)
57{
58 struct dirent *de;
59
60repeat:
61 errno = 0;
62 de = readdir(dir);
63 if (!de) {
64 if (errno) {
65 warning_errno("error reading directory '%s'",
66 path);
67 return -1;
68 }
69
70 return 1;
71 }
72
73 if (is_dot_or_dotdot(de->d_name))
74 goto repeat;
75
76 *out = de;
77 return 0;
78}
79
80/*
81 * Push a level in the iter stack and initialize it with information from

Callers 2

push_levelFunction · 0.85
dir_iterator_advanceFunction · 0.85

Calls 3

readdirFunction · 0.85
warning_errnoFunction · 0.85
is_dot_or_dotdotFunction · 0.85

Tested by

no test coverage detected