Removed unused code
This commit is contained in:
parent
2398551415
commit
c98e6d20fc
30
src/utils.ts
30
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<string[]> => {
|
|
||||||
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
|
* Checks if a git repository is shallow
|
||||||
* @param cwd - working directory
|
* @param cwd - working directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user