Open History to see the last commit
1// Override inherited autocrlf, signing and init-branch settings through env so every git child gets stable fixtures.
2const entries: ReadonlyArray<readonly [key: string, value: string]> = [
3 ["core.autocrlf", "false"],
4 ["core.filemode", "false"],
5 ["core.longpaths", "true"],
6 ["commit.gpgsign", "false"],
7 ["tag.gpgsign", "false"],
8 ["init.defaultBranch", "main"],
9];
10
11const existing = Number(process.env.GIT_CONFIG_COUNT ?? "0");
12process.env.GIT_CONFIG_COUNT = String(existing + entries.length);
13entries.forEach(([key, value], index) => {
14 process.env[`GIT_CONFIG_KEY_${existing + index}`] = key;
15 process.env[`GIT_CONFIG_VALUE_${existing + index}`] = value;
16});