Ver código fonte

Refines merge/rebase messaging when up to date

Refs: #1660
main
Eric Amodio 1 ano atrás
pai
commit
b2b5b93029
3 arquivos alterados com 19 adições e 6 exclusões
  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 Ver arquivo

@ -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 Ver arquivo

@ -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 Ver arquivo

@ -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);

Carregando…
Cancelar
Salvar