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

Function cv_incremental_base

tests/test_conditional_variants.c:702–713  ·  view source on GitHub ↗

Write `files` into a fresh repository and index it once (the base the * edits repair). */

Source from the content-addressed store, hash-verified

700/* Write `files` into a fresh repository and index it once (the base the
701 * edits repair). */
702static bool cv_incremental_base(char *repo, size_t repo_n, char *dbdir, size_t dbdir_n,
703 const cv_file_t *files, int count) {
704 snprintf(repo, repo_n, "%s", th_mktempdir("cbm-cvinc"));
705 snprintf(dbdir, dbdir_n, "%s", th_mktempdir("cbm-cvdb"));
706 bool ok = repo[0] && dbdir[0];
707 for (int i = 0; ok && i < count; i++) {
708 ok = cv_write(repo, &files[i]);
709 }
710 char inc_db[600];
711 snprintf(inc_db, sizeof(inc_db), "%s/inc.db", dbdir);
712 return ok && cv_pipeline(repo, inc_db, NULL);
713}
714
715TEST(cv_incremental_variant_partners) {
716 char repo[300];

Callers 1

Calls 3

th_mktempdirFunction · 0.85
cv_writeFunction · 0.85
cv_pipelineFunction · 0.85

Tested by

no test coverage detected