Initial open-source release

This commit is contained in:
Andrey Avtomonov 2026-05-10 23:12:26 +02:00
commit 1a42152e6f
1199 changed files with 257054 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import { type SimpleGit, simpleGit } from 'simple-git';
const PRE_COMMIT_GIT_ENV = [
'GIT_ALTERNATE_OBJECT_DIRECTORIES',
'GIT_CONFIG_COUNT',
'GIT_CONFIG_PARAMETERS',
'GIT_DIR',
'GIT_EXEC_PATH',
'GIT_INDEX_FILE',
'GIT_PREFIX',
'GIT_WORK_TREE',
] as const;
export function createSimpleGit(baseDir?: string): SimpleGit {
const env = { ...process.env };
for (const key of PRE_COMMIT_GIT_ENV) {
delete env[key];
}
return simpleGit(baseDir).env(env);
}