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

Function sh_state_init

src/pipeline/pass_shell.c:2839–2844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2837} sh_pass_t;
2838
2839static void sh_state_init(sh_t *s, sh_pass_t *p, CBMArena *a, const char *rel) {
2840 *s = (sh_t){.ix = p->ix, .hits = p->hits, .a = a, .file = rel};
2841 s->env = cbm_ht_create(0);
2842 const char *dir = sh_dirname(a, rel);
2843 s->sdir = (dir && strcmp(dir, ".") != 0) ? dir : "";
2844}
2845
2846static void sh_state_free(sh_t *s) {
2847 if (s->env) {

Callers 3

sh_scriptFunction · 0.85
sh_makefileFunction · 0.85
sh_ci_cmdFunction · 0.85

Calls 2

cbm_ht_createFunction · 0.85
sh_dirnameFunction · 0.85

Tested by

no test coverage detected