diff --git a/src/utils.ts b/src/utils.ts index f330cd92..2e01a4ee 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -233,36 +233,6 @@ export const updateGitGlobalConfig = async ({ } } -/** - * Get tracked git directories - * @param cwd - working directory - */ -export const getGitTrackedDirectories = async ({ - cwd -}: { - cwd: string -}): Promise => { - const {exitCode, stdout, stderr} = await exec.getExecOutput( - 'git', - ['ls-tree', '-d', '-r', '--name-only', 'HEAD'], - { - cwd, - ignoreReturnCode: true, - silent: !core.isDebug() - } - ) - - if (exitCode !== 0) { - core.warning(stderr || "Couldn't list tracked directories") - return [] - } - - return stdout - .trim() - .split('\n') - .map((line: string) => normalizeSeparators(line.trim())) -} - /** * Checks if a git repository is shallow * @param cwd - working directory