git: handle deleted conflicts

fixes #52787
This commit is contained in:
Joao Moreno
2018-09-19 15:46:23 +02:00
parent 758f2495cd
commit 4e3f58f2f4
6 changed files with 114 additions and 16 deletions

View File

@@ -900,6 +900,18 @@ export class Repository {
await this.run(args);
}
async rm(paths: string[]): Promise<void> {
const args = ['rm', '--'];
if (!paths || !paths.length) {
return;
}
args.push(...paths);
await this.run(args);
}
async stage(path: string, data: string): Promise<void> {
const child = this.stream(['hash-object', '--stdin', '-w', '--path', path], { stdio: [null, null, null] });
child.stdin.end(data, 'utf8');