Browse Source

Fixes #917 - adds explicit --soft reset choice

main
Eric Amodio 4 years ago
parent
commit
0752149a56
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/commands/git/reset.ts

+ 7
- 2
src/commands/git/reset.ts View File

@ -14,7 +14,7 @@ import {
} from '../../quickpicks';
import { Logger } from '../../logger';
type Flags = '--hard';
type Flags = '--hard' | '--soft';
interface State {
repo: Repository;
@ -150,9 +150,14 @@ export class ResetGitCommand extends QuickCommandBase {
`Confirm ${this.title}${Strings.pad(GlyphChars.Dot, 2, 2)}${state.repo.formattedName}`,
[
FlagsQuickPickItem.create<Flags>(state.flags, [], {
label: this.title,
description: `${destination.name} to ${state.reference.name}`,
detail: `Will reset (leaves changes in the working tree) ${destination.name} to ${state.reference.name}`,
}),
FlagsQuickPickItem.create<Flags>(state.flags, ['--soft'], {
label: `Soft ${this.title}`,
description: `--soft ${destination.name} to ${state.reference.name}`,
detail: `Will soft reset (leaves changes in the working tree) ${destination.name} to ${state.reference.name}`,
detail: `Will soft reset (leaves changes in the index and working tree) ${destination.name} to ${state.reference.name}`,
}),
FlagsQuickPickItem.create<Flags>(state.flags, ['--hard'], {
label: `Hard ${this.title}`,

Loading…
Cancel
Save