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

Function merge_pkg_entries

src/pipeline/pass_parallel.c:975–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

973}
974
975static void merge_pkg_entries(cbm_pipeline_ctx_t *ctx, cbm_pkg_entries_t *pkg_entries,
976 int worker_count) {
977 if (!pkg_entries) {
978 return;
979 }
980 /* Supplement with a repo-wide filesystem walk so manifests filtered
981 * by the main discoverer (package.json, composer.json — in
982 * IGNORED_JSON_FILES) still feed pkgmap. Append into worker 0's
983 * array so the existing merge below sees them. */
984 cbm_pkgmap_scan_repo(ctx->repo_path, &pkg_entries[0], ctx->excluded_dirs, ctx->excluded_count);
985 cbm_pipeline_set_pkgmap(cbm_pkgmap_build(pkg_entries, worker_count, ctx->project_name));
986 for (int i = 0; i < worker_count; i++) {
987 cbm_pkg_entries_free(&pkg_entries[i]);
988 }
989 free(pkg_entries);
990}
991
992static void log_extract_mem_stats(int worker_count) {
993 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