MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / gi_basename

Function gi_basename

src/discover/gitignore_core.c:180–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180static const char *gi_basename(const char *path, gi_guard_t *guard) {
181 const char *basename = path;
182 for (;;) {
183 if (!gi_work(guard, 1)) {
184 return NULL;
185 }
186 if (!*path) {
187 return basename;
188 }
189 if (*path == '/') {
190 basename = path + 1;
191 }
192 path++;
193 }
194}
195
196static bool match_unrooted(const char *pattern, const char *path, const char *basename,
197 gi_guard_t *guard) {

Callers 1

gi_core_matchFunction · 0.85

Calls 1

gi_workFunction · 0.85

Tested by

no test coverage detected