瀏覽代碼

Fixes push confirm message when not ahead

main
Eric Amodio 4 年之前
父節點
當前提交
48738a1b83
共有 1 個檔案被更改,包括 10 行新增1 行删除
  1. +10
    -1
      src/commands/git/push.ts

+ 10
- 1
src/commands/git/push.ts 查看文件

@ -302,7 +302,7 @@ export class PushGitCommand extends QuickCommand {
undefined,
{ placeholder: 'Confirm Publish' },
);
} else {
} else if (status.upstream == null) {
step = this.createConfirmStep(
appendReposToTitle('Confirm Publish', state, context),
[],
@ -312,6 +312,15 @@ export class PushGitCommand extends QuickCommand {
}),
{ placeholder: 'Confirm Publish' },
);
} else {
step = this.createConfirmStep(
appendReposToTitle('Confirm Push', state, context),
[],
DirectiveQuickPickItem.create(Directive.Cancel, true, {
label: `Cancel ${this.title}`,
detail: `Cannot push; No commits ahead of ${GitBranch.getRemote(status.upstream)}`,
}),
);
}
} else {
let lastFetchedOn = '';

Loading…
取消
儲存