提交 aac29b41 编写于 作者: J Joao Moreno

💄

上级 93802254
......@@ -633,7 +633,7 @@ export interface CommitOptions {
export enum ForcePushMode {
Force,
ForceWithLease,
ForceWithLease
}
export class Repository {
......@@ -1206,12 +1206,10 @@ export class Repository {
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 (forcePushMode === ForcePushMode.ForceWithLease) {
args.push('--force-with-lease');
} else if (forcePushMode === ForcePushMode.Force) {
args.push('--force');
}
if (setUpstream) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册