Skip to content

Commit

Permalink
Closes #1693: adds --no-commit to cherry pick
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Nov 3, 2021
1 parent b562e0c commit 7a67ced
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

### Added

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

### Fixed

- Fixes [#1609](https://github.com/eamodio/vscode-gitlens/issues/1609) - X.globalState.setKeysForSync is not a function — thanks to [PR #1610](https://github.com/eamodio/vscode-gitlens/pull/1610) by Stanislav Lvovsky ([@slavik-lvovsky](https://github.com/slavik-lvovsky))
Expand Down
9 changes: 8 additions & 1 deletion src/commands/git/cherry-pick.ts
Expand Up @@ -26,7 +26,7 @@ interface Context {
title: string;
}

type Flags = '--edit';
type Flags = '--edit' | '--no-commit';

interface State<Refs = GitReference | GitReference[]> {
repo: string | Repository;
Expand Down Expand Up @@ -219,6 +219,13 @@ export class CherryPickGitCommand extends QuickCommand<State> {
context.destination,
)}`,
}),
FlagsQuickPickItem.create<Flags>(state.flags, ['--no-commit'], {
label: `${this.title} without Committing`,
description: '--no-commit',
detail: `Will apply ${GitReference.toString(state.references)} to ${GitReference.toString(
context.destination,
)} without Committing`,
}),
],
context,
);
Expand Down

0 comments on commit 7a67ced

Please sign in to comment.