Try refactor of file changes
This commit is contained in:
parent
f09d6ed256
commit
9d7ad21b2f
4 changed files with 144 additions and 53 deletions
|
|
@ -166,12 +166,11 @@ export class GitCommandManager {
|
|||
return output.exitCode === 1
|
||||
}
|
||||
|
||||
async getChangedFiles(ref: string, options?: string[]): Promise<string[]> {
|
||||
async getChangedFiles(options?: string[]): Promise<string[]> {
|
||||
const args = ['diff', '--name-only']
|
||||
if (options) {
|
||||
args.push(...options)
|
||||
}
|
||||
args.push(ref)
|
||||
const output = await this.exec(args)
|
||||
return output.stdout.split('\n').filter(filename => filename != '')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue