From 4a0b4a60a5b9a01af0d53235d54f6519ce0bb890 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 17 Nov 2021 03:04:00 -0500 Subject: [PATCH] Adds @dimaulupov's contribution Aligns terminology with other commands --- CHANGELOG.md | 5 +++++ README.md | 1 + src/commands/git/merge.ts | 27 ++++++++++++--------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e391393..e15a8cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Adds a `gitlens.statusBar.tooltipFormat` setting to specify the format (in markdown) of hover shown over the blame information in the status bar - Adds a new rich hover to the GitLens mode in the status bar - Adds a new _Cherry Pick without Committing_ confirmation option to the _Git Command Palette_'s _cherry-pick_ command — closes [#1693](https://github.com/eamodio/vscode-gitlens/issues/1693) +- Adds a new _Merge without Fast-Forwarding or Committing_ confirmation option to the _Git Command Palette_'s _merge_ command — closes [#1178](https://github.com/eamodio/vscode-gitlens/issues/1178) thanks to [PR #1621](https://github.com/eamodio/vscode-gitlens/pull/1621) by Dmitry Ulupov ([@dimaulupov](https://github.com/dimaulupov)) - Adds new _Open File_ command (with _Open Revision_ as an `alt-click`) to files in comparisons — closes [#1710](https://github.com/eamodio/vscode-gitlens/issues/1710) - Adds commit message autolinking of merged pull requests for Azure Repos — closes [#1486](https://github.com/eamodio/vscode-gitlens/issues/1486) thanks to [PR #1487](https://github.com/eamodio/vscode-gitlens/pull/1487) by Mark Molinaro ([@markjm](https://github.com/markjm)) - Adds a new `AzureDevOps` type to `gitlens.remotes` to better support Azure DevOps remote matching — thanks to [PR #1487](https://github.com/eamodio/vscode-gitlens/pull/1487) by Dmitry Gurovich ([@yrtimiD](https://github.com/yrtimiD)) - Adds functional groupings to all GitLens settings when using the VS Code settings UI. Groups will be displayed in the table of contents in the settings UI — thanks to @rzhao271 for adding grouping support to VS Code settings UI +### Changed + +- Changes the _No Fast-forward Merge_ confirmation option in the _Git Command Palette_'s _merge_ command to _Merge without Fast-Forwarding_ + ### Fixed - Fixes [#1669](https://github.com/Axosoft/vscode-gitlens/issues/1669) - Workitem Link (Hover ) for Repository (DevOps) with Blank is broken diff --git a/README.md b/README.md index d0d7e21..7c10c57 100644 --- a/README.md +++ b/README.md @@ -1119,6 +1119,7 @@ A big thanks to the people that have contributed to this project: - Alexey Svetliakov ([@asvetliakov](https://github.com/asvetliakov)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=asvetliakov) - Takashi Tamura ([@tamuratak](https://github.com/tamuratak)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=tamuratak) - Andy Tang ([@thewindsofwinter](https://github.com/thewindsofwinter)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=thewindsofwinter) +- Dmitry Ulupov ([@dimaulupov](https://github.com/dimaulupov)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=dimaulupov) - Alexey Vasyukov ([@notmedia](https://github.com/notmedia)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=notmedia) - Ivan Volzhev ([@ivolzhevbt](https://github.com/ivolzhevbt)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=ivolzhevbt) - x13machine ([@x13machine](https://github.com/x13machine)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=x13machine) diff --git a/src/commands/git/merge.ts b/src/commands/git/merge.ts index 1d7f941..22d31f8 100644 --- a/src/commands/git/merge.ts +++ b/src/commands/git/merge.ts @@ -29,7 +29,7 @@ interface Context { title: string; } -type Flags = '--ff-only' | '--no-ff' | '--squash' | '--no-commit' ; +type Flags = '--ff-only' | '--no-ff' | '--squash' | '--no-commit'; interface State { repo: string | Repository; @@ -231,8 +231,15 @@ export class MergeGitCommand extends QuickCommand { state.reference, )} into ${GitReference.toString(context.destination)}`, }), + FlagsQuickPickItem.create(state.flags, ['--squash'], { + label: `Squash ${this.title}`, + description: '--squash', + detail: `Will squash ${Strings.pluralize('commit', count)} from ${GitReference.toString( + state.reference, + )} into one when merging into ${GitReference.toString(context.destination)}`, + }), FlagsQuickPickItem.create(state.flags, ['--no-ff'], { - label: `No Fast-forward ${this.title}`, + label: `${this.title} without Fast-Forwarding`, description: '--no-ff', detail: `Will create a merge commit when merging ${Strings.pluralize( 'commit', @@ -242,21 +249,11 @@ export class MergeGitCommand extends QuickCommand { )}`, }), FlagsQuickPickItem.create(state.flags, ['--no-ff', '--no-commit'], { - label: `No Fast-forward and no commit ${this.title}`, + label: `${this.title} without Fast-Forwarding or Committing`, description: '--no-ff --no-commit', - detail: `Will stop before making commit when merging ${Strings.pluralize( - 'commit', - count, - )} from ${GitReference.toString(state.reference)} into ${GitReference.toString( - context.destination, - )}`, - }), - FlagsQuickPickItem.create(state.flags, ['--squash'], { - label: `Squash ${this.title}`, - description: '--squash', - detail: `Will squash ${Strings.pluralize('commit', count)} from ${GitReference.toString( + detail: `Will merge ${Strings.pluralize('commit', count)} from ${GitReference.toString( state.reference, - )} into one when merging into ${GitReference.toString(context.destination)}`, + )} into ${GitReference.toString(context.destination)} without Committing`, }), ], );