From c5df5594dede289865d3a12c7c86dfa3695b130e Mon Sep 17 00:00:00 2001 From: Dmitry Ulupov Date: Wed, 1 Sep 2021 04:58:24 +0000 Subject: [PATCH] Fixes #1178: adds '--no-ff --no-commit' option to merge --- src/commands/git/merge.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/commands/git/merge.ts b/src/commands/git/merge.ts index 9d1e5b8..1d7f941 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'; +type Flags = '--ff-only' | '--no-ff' | '--squash' | '--no-commit' ; interface State { repo: string | Repository; @@ -241,6 +241,16 @@ export class MergeGitCommand extends QuickCommand { context.destination, )}`, }), + FlagsQuickPickItem.create(state.flags, ['--no-ff', '--no-commit'], { + label: `No Fast-forward and no commit ${this.title}`, + 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',