Merge commit 'refs/pull/53286/head' of github.com:Microsoft/vscode into pr/53286

This commit is contained in:
Joao Moreno
2018-09-13 17:01:23 +02:00
6 changed files with 149 additions and 53 deletions

View File

@@ -1198,9 +1198,17 @@ export class Repository {
}
}
async push(remote?: string, name?: string, setUpstream: boolean = false, tags = false): Promise<void> {
async push(remote?: string, name?: string, setUpstream: boolean = false, tags = false, forcePushMode?: ForcePushMode): Promise<void> {
const args = ['push'];
if (forcePushMode) {
if (forcePushMode === ForcePushMode.ForceWithLease) {
args.push('--force-with-lease');
} else if (forcePushMode === ForcePushMode.Force) {
args.push('--force');
}
}
if (setUpstream) {
args.push('-u');
}