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

Function gf_oid

src/mcp/test_impact_git.c:678–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678static bool gf_oid(char out[65], const unsigned char *text, size_t length, unsigned width) {
679 if ((width != 40 && width != 64) || length != width)
680 return false;
681 for (unsigned i = 0; i < width; i++) {
682 unsigned char c = text[i];
683 if (c >= 'A' && c <= 'F')
684 c = (unsigned char)(c + ('a' - 'A'));
685 if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')))
686 return false;
687 out[i] = (char)c;
688 }
689 out[width] = '\0';
690 return true;
691}
692
693static bool gf_oid_line(cbm_git_facts_t *facts, const cbm_git_bytes_t *bytes, char out[65],
694 cbm_git_facts_error_t *error) {

Callers 7

gf_oid_lineFunction · 0.70
gf_open_identityFunction · 0.70
cbm_git_facts_openFunction · 0.70
gf_inventory_recordFunction · 0.70
cbm_git_facts_read_blobFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected