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

Function split_published_generation

tests/test_pipeline.c:5437–5451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5435}
5436
5437static bool split_published_generation(const char *generation, char uid[18],
5438 unsigned long long *mutation) {
5439 if (!generation || strlen(generation) < 19 || generation[0] != 'u' || generation[17] != 'g') {
5440 return false;
5441 }
5442 memcpy(uid, generation, 17);
5443 uid[17] = '\0';
5444 char *end = NULL;
5445 unsigned long long parsed = strtoull(generation + 18, &end, 10);
5446 if (!end || end == generation + 18 || *end != '\0') {
5447 return false;
5448 }
5449 *mutation = parsed;
5450 return true;
5451}
5452
5453/* Every published database must carry cursor-generation metadata. A complete
5454 * replacement gets a fresh database identity; an isolated delta clones the

Callers 1

test_pipeline.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected