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

Function sh_t_chart

src/pipeline/pass_shell.c:1272–1284  ·  view source on GitHub ↗

A chart directory: its Chart. */

Source from the content-addressed store, hash-verified

1270
1271/* A chart directory: its Chart. */
1272static int sh_t_chart(sh_t *s, const char *dir, const sh_find_t *f, sh_targets_t *out) {
1273 (void)f;
1274 static const char *const names[] = {"Chart.yaml", "Chart.yml"};
1275 for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); i++) {
1276 const char *p = cbm_arena_sprintf(s->a, "%s%s%s", dir, dir[0] ? "/" : "", names[i]);
1277 const char *key = p ? cbm_ht_get_key(s->ix->charts, p) : NULL;
1278 if (key) {
1279 sh_targets_push(out, (int64_t)(intptr_t)cbm_ht_get(s->ix->charts, key), dir);
1280 return SKIP_ONE;
1281 }
1282 }
1283 return 0;
1284}
1285
1286/* Where `cd v` lands: *out = AT an existing directory, else LOST. */
1287static const char *sh_cd_target(sh_t *s, const char *v, sh_cwd_t *out) {

Callers

nothing calls this directly

Calls 4

cbm_ht_get_keyFunction · 0.85
sh_targets_pushFunction · 0.85
cbm_ht_getFunction · 0.85
cbm_arena_sprintfFunction · 0.50

Tested by

no test coverage detected