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

Function merge_pkg_entries

src/pipeline/pass_parallel.c:1003–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003static void merge_pkg_entries(cbm_pipeline_ctx_t *ctx, cbm_pkg_entries_t *pkg_entries,
1004 int worker_count) {
1005 if (!pkg_entries) {
1006 return;
1007 }
1008 /* Supplement with a repo-wide filesystem walk so manifests filtered
1009 * by the main discoverer (package.json, composer.json — in
1010 * IGNORED_JSON_FILES) still feed pkgmap. Append into worker 0's
1011 * array so the existing merge below sees them. */
1012 cbm_pkgmap_scan_repo(ctx->repo_path, &pkg_entries[0], ctx->excluded_dirs, ctx->excluded_count);
1013 cbm_pipeline_set_pkgmap(cbm_pkgmap_build(pkg_entries, worker_count, ctx->project_name));
1014 for (int i = 0; i < worker_count; i++) {
1015 cbm_pkg_entries_free(&pkg_entries[i]);
1016 }
1017 free(pkg_entries);
1018}
1019
1020static void log_extract_mem_stats(int worker_count) {
1021 if (cbm_mem_budget() > 0) {

Callers 1

cbm_parallel_extract_exFunction · 0.85

Calls 4

cbm_pkgmap_scan_repoFunction · 0.85
cbm_pipeline_set_pkgmapFunction · 0.85
cbm_pkgmap_buildFunction · 0.85
cbm_pkg_entries_freeFunction · 0.85

Tested by

no test coverage detected