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

Function changes_find

src/mcp/test_impact_changes.c:120–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static size_t changes_find(const cbm_changes_t *changes, const unsigned char *path, size_t length) {
121 size_t low = 0;
122 size_t high = changes->count;
123 while (low < high) {
124 size_t middle = low + (high - low) / 2;
125 const cbm_change_file_t *file = &changes->files[middle];
126 int order = changes_path_compare(file->path, file->path_length, path, length);
127 if (!order) {
128 return middle;
129 }
130 if (order < 0) {
131 low = middle + 1;
132 } else {
133 high = middle;
134 }
135 }
136 return SIZE_MAX;
137}
138
139static bool changes_starts(changes_slice_t line, const char *prefix) {
140 size_t length = strlen(prefix);

Callers 2

changes_audit_headersFunction · 0.85
changes_reconcileFunction · 0.85

Calls 1

changes_path_compareFunction · 0.85

Tested by

no test coverage detected