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

Function gf_contains

tests/test_test_impact_git.c:320–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320static bool gf_contains(cbm_git_bytes_t bytes, const char *needle) {
321 size_t length = strlen(needle);
322 if (!bytes.data || length > bytes.length)
323 return false;
324 for (size_t i = 0; i <= bytes.length - length; i++) {
325 if (memcmp(bytes.data + i, needle, length) == 0)
326 return true;
327 }
328 return false;
329}
330
331static bool gf_blob_cleared(const cbm_git_blob_t *blob) {
332 return !blob->bytes.data && blob->bytes.length == 0 && blob->oid[0] == '\0' && blob->mode == 0;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected