Просмотр исходного кода

Fixes #917 - adds explicit --soft reset choice

main
Eric Amodio 4 лет назад
Родитель
Сommit
0752149a56
1 измененных файлов: 7 добавлений и 2 удалений
  1. +7
    -2
      src/commands/git/reset.ts

+ 7
- 2
src/commands/git/reset.ts Просмотреть файл

@ -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}`,

Загрузка…
Отмена
Сохранить