mirror of
https://github.com/tj-actions/changed-files
synced 2025-02-21 05:28:14 +00:00
Removed unused code
This commit is contained in:
parent
2398551415
commit
c98e6d20fc
1 changed files with 0 additions and 30 deletions
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
|
||||
* @param cwd - working directory
|
||||
|
|
Loading…
Add table
Reference in a new issue