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

Function gf_line

src/mcp/test_impact_git.c:606–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604}
605
606static bool gf_line(const cbm_git_bytes_t *bytes, const unsigned char **text, size_t *length) {
607 if (!bytes->length || bytes->data[bytes->length - 1] != '\n')
608 return false;
609 size_t n = bytes->length - 1;
610#ifdef _WIN32
611 if (n && bytes->data[n - 1] == '\r')
612 n--;
613#endif
614 if (memchr(bytes->data, '\0', n) || memchr(bytes->data, '\n', n) ||
615 memchr(bytes->data, '\r', n))
616 return false;
617 *text = bytes->data;
618 *length = n;
619 return true;
620}
621
622static bool gf_active_line(cbm_git_facts_t *facts, const cbm_git_bytes_t *bytes,
623 const unsigned char **text, size_t *length,

Callers 4

gf_active_lineFunction · 0.85
gf_oid_lineFunction · 0.85
gf_decimal_sizeFunction · 0.85
gf_ancestor_commit_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected