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

Function gitenv_enter

tests/test_subprocess.c:1670–1678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1668} gitenv_snapshot_t;
1669
1670static void gitenv_enter(gitenv_snapshot_t *snap) {
1671 for (int i = 0; i < CBM_GIT_REPO_ENV_VAR_COUNT; i++) {
1672 const char *v = getenv(cbm_git_repo_env_vars[i]);
1673 snap->present[i] = v != NULL;
1674 snap->saved[i] = v ? strdup(v) : NULL;
1675 setenv(cbm_git_repo_env_vars[i], "/cbm-decoy-repo", 1);
1676 }
1677 setenv("CBM_GITENV_KEEP", "kept", 1);
1678}
1679
1680static void gitenv_leave(gitenv_snapshot_t *snap) {
1681 for (int i = 0; i < CBM_GIT_REPO_ENV_VAR_COUNT; i++) {

Callers 1

test_subprocess.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected