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

Function gf_names_valid

src/mcp/test_impact_git.c:1394–1410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1392}
1393
1394static bool gf_names_valid(const cbm_git_bytes_t *bytes) {
1395 size_t at = 0;
1396 while (at < bytes->length) {
1397 if (bytes->length - at < 3 || bytes->data[at + 1] != '\0')
1398 return false;
1399 unsigned char status = bytes->data[at];
1400 if (status != 'A' && status != 'D' && status != 'M' && status != 'T')
1401 return false;
1402 at += 2;
1403 const unsigned char *end = memchr(bytes->data + at, '\0', bytes->length - at);
1404 if (!end ||
1405 !gf_relative_path((const char *)bytes->data + at, (size_t)(end - (bytes->data + at))))
1406 return false;
1407 at = (size_t)(end - bytes->data) + 1;
1408 }
1409 return true;
1410}
1411
1412bool cbm_git_facts_diff(cbm_git_facts_t *facts, cbm_git_diff_t *out, cbm_git_facts_error_t *error) {
1413 cbm_git_facts_error_t local;

Callers 1

cbm_git_facts_diffFunction · 0.85

Calls 1

gf_relative_pathFunction · 0.85

Tested by

no test coverage detected