mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* test: clear inherited GIT_* env once per test file so real-Git suites cannot write into an outer repo * test: clear only repo-locating Git env so the compat lane keeps GIT_EXEC_PATH
15 lines
388 B
TypeScript
15 lines
388 B
TypeScript
// A hook's repo-locating Git env would aim real-Git suites at the outer repo; keep GIT_EXEC_PATH and config, which the compat lane sets.
|
|
for (const name of [
|
|
'GIT_DIR',
|
|
'GIT_WORK_TREE',
|
|
'GIT_INDEX_FILE',
|
|
'GIT_COMMON_DIR',
|
|
'GIT_OBJECT_DIRECTORY',
|
|
'GIT_ALTERNATE_OBJECT_DIRECTORIES',
|
|
'GIT_NAMESPACE',
|
|
'GIT_PREFIX',
|
|
'GIT_QUARANTINE_PATH'
|
|
]) {
|
|
delete process.env[name]
|
|
}
|