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

Function stem_repo

tests/test_pipeline.c:4871–4894  ·  view source on GitHub ↗

Every collision shape of cbm_stem_marks_t, plus `fillers` plain scripts. */

Source from the content-addressed store, hash-verified

4869
4870/* Every collision shape of cbm_stem_marks_t, plus `fillers` plain scripts. */
4871static void stem_repo(const char *tmp, int fillers) {
4872 write_temp_file(tmp, "genproto.sh", "#!/bin/sh\ngen_all() {\n echo all\n}\n");
4873 write_temp_file(tmp, "genproto/one.sh", "#!/bin/sh\ngen_one() {\n echo one\n}\n");
4874 write_temp_file(tmp, "rs/foo.rs", "pub mod bar;\npub fn top() {}\n");
4875 write_temp_file(tmp, "rs/foo/bar.rs", "pub fn inner() {}\n");
4876 write_temp_file(tmp, "c/foo.h", "int foo_add(int a, int b);\n");
4877 write_temp_file(tmp, "c/foo.c", "#include \"foo.h\"\nint foo_add(int a, int b) { return a + b; }\n");
4878 write_temp_file(tmp, "c/foo/x.c", "int foo_x(void) { return 1; }\n");
4879 write_temp_file(tmp, "ts/foo.test.ts", "export function stemProbeA(): number { return 1; }\n");
4880 write_temp_file(tmp, "ts/foo/test/a.ts", "export function stemProbeB(): number { return 2; }\n");
4881 write_temp_file(tmp, "go.mod", "module example.com/stem\n\ngo 1.21\n");
4882 write_temp_file(tmp, "goapi/api.sh", "#!/bin/sh\nrun_api() {\n echo api\n}\n");
4883 write_temp_file(tmp, "goapi/api/server.go", "package api\n\nfunc Serve() {}\n");
4884 write_temp_file(tmp, "goapi/main/main.go",
4885 "package main\n\nimport \"example.com/stem/goapi/api\"\n\n"
4886 "func main() { api.Serve() }\n");
4887 for (int i = 0; i < fillers; i++) {
4888 char name[64];
4889 char body[128];
4890 snprintf(name, sizeof(name), "fill/f%02d.sh", i);
4891 snprintf(body, sizeof(body), "#!/bin/sh\nfill_%02d() {\n echo %d\n}\n", i, i);
4892 write_temp_file(tmp, name, body);
4893 }
4894}
4895
4896/* A file and the directory beside it with one stem (genproto.sh, genproto/)
4897 * shared a QN, and the graph buffer kept only the Folder: the file's Module

Callers 1

test_pipeline.cFile · 0.85

Calls 1

write_temp_fileFunction · 0.85

Tested by

no test coverage detected