ソースを参照

Refines merge/rebase messaging when up to date

Refs: #1660
main
Eric Amodio 1年前
コミット
b2b5b93029
3個のファイルの変更19行の追加6行の削除
  1. +1
    -0
      CHANGELOG.md
  2. +9
    -3
      src/commands/git/merge.ts
  3. +9
    -3
      src/commands/git/rebase.ts

+ 1
- 0
CHANGELOG.md ファイルの表示

@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed
- Improves accuracy, performance, and memory usage related to parsing diffs, used in _Changes_ hovers, _Changes_ file annotations, etc
- Refines merge/rebase messaging when there is nothing to do — refs [#1660](https://github.com/gitkraken/vscode-gitlens/issues/1660)
### Fixed

+ 9
- 3
src/commands/git/merge.ts ファイルの表示

@ -212,14 +212,20 @@ export class MergeGitCommand extends QuickCommand {
const count = aheadBehind != null ? aheadBehind.ahead + aheadBehind.behind : 0;
if (count === 0) {
const step: QuickPickStep<DirectiveQuickPickItem> = this.createConfirmStep(
appendReposToTitle(`Confirm ${context.title}`, state, context),
appendReposToTitle(context.title, state, context),
[],
createDirectiveQuickPickItem(Directive.Cancel, true, {
label: `Cancel ${this.title}`,
label: 'OK',
detail: `${getReferenceLabel(context.destination, {
capitalize: true,
})} is up to date with ${getReferenceLabel(state.reference)}`,
})} is already up to date with ${getReferenceLabel(state.reference)}`,
}),
{
placeholder: `Nothing to merge; ${getReferenceLabel(context.destination, {
label: false,
icon: false,
})} is already up to date`,
},
);
const selection: StepSelection<typeof step> = yield step;
canPickStepContinue(step, state, selection);

+ 9
- 3
src/commands/git/rebase.ts ファイルの表示

@ -223,14 +223,20 @@ export class RebaseGitCommand extends QuickCommand {
const count = aheadBehind != null ? aheadBehind.ahead + aheadBehind.behind : 0;
if (count === 0) {
const step: QuickPickStep<DirectiveQuickPickItem> = this.createConfirmStep(
appendReposToTitle(`Confirm ${context.title}`, state, context),
appendReposToTitle(context.title, state, context),
[],
createDirectiveQuickPickItem(Directive.Cancel, true, {
label: `Cancel ${this.title}`,
label: 'OK',
detail: `${getReferenceLabel(context.destination, {
capitalize: true,
})} is up to date with ${getReferenceLabel(state.reference)}`,
})} is already up to date with ${getReferenceLabel(state.reference)}`,
}),
{
placeholder: `Nothing to rebase; ${getReferenceLabel(context.destination, {
label: false,
icon: false,
})} is already up to date`,
},
);
const selection: StepSelection<typeof step> = yield step;
canPickStepContinue(step, state, selection);

読み込み中…
キャンセル
保存