INNER CODE UNIT · TypeScript
assertGitlinksWithTempIndex
EndBug/add-and-commit · src/main.ts:505
async function assertGitlinksWithTempIndex(
addArgGroups: string[],
ignoreErrors: 'all' | 'pathspec' | 'none',
) {
const tmpIndex = path.join(
os.tmpdir(),
`add-and-commit-${process.pid}-${Date.now()}.index`,
);
try {
const indexPathRaw = (
await git.raw(['rev-parse', '--git-path', 'index'])
).trim();
const indexPath = path.isAbsolute(indexPathRaw)
? indexPathRaw
: path.join(baseDir, indexPathRaw);
if (fs.existsSync(indexPath)) {