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

Function gi_path_valid

src/discover/gitignore_checked.c:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static bool gi_path_valid(gi_guard_t *guard, const char *path, size_t length) {
50 for (size_t i = 0; i <= length; i++) {
51 guard->offset = i;
52 if (!gi_work(guard, 1)) {
53 return false;
54 }
55 if ((path[i] == '\0') != (i == length)) {
56 return gi_fail(guard, CBM_IGNORE_CHECKED_UNSUPPORTED, CBM_IGNORE_CAP_NONE);
57 }
58 }
59 guard->offset = SIZE_MAX;
60 return true;
61}
62
63cbm_ignore_checked_status_t cbm_ignore_checked_match(
64 cbm_ignore_checked_t *owner, const cbm_ignore_program_t *program, const char *path,

Callers 1

cbm_ignore_checked_matchFunction · 0.85

Calls 2

gi_workFunction · 0.85
gi_failFunction · 0.85

Tested by

no test coverage detected