ソースを参照

Fixes #451 - Stops apply changes from HEAD if the sha is missing or HEAD

Also allows for vscode undo support for the applied changes
main
Eric Amodio 6年前
コミット
765dfe2225
2個のファイルの変更9行の追加2行の削除
  1. +4
    -0
      CHANGELOG.md
  2. +5
    -2
      src/views/explorerCommands.ts

+ 4
- 0
CHANGELOG.md ファイルの表示

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Fixed
- Fixes [#451](https://github.com/eamodio/vscode-gitlens/issues/451) - "apply Changes" has discarded all my changes.
## [8.5.1] - 2018-07-18
### Added
- Adds emoji support, e.g. :smile: in commit messages will now be 😃 — closes [#429](https://github.com/eamodio/vscode-gitlens/issues/429)

+ 5
- 2
src/views/explorerCommands.ts ファイルの表示

@ -100,8 +100,11 @@ export class ExplorerCommands extends Disposable {
}
private async applyChanges(node: CommitFileNode | StashFileNode | StatusFileNode) {
await Container.git.checkoutFile(node.uri);
return this.openFile(node);
await this.openFile(node);
if (node.uri.sha !== undefined && node.uri.sha !== 'HEAD') {
await Container.git.checkoutFile(node.uri);
}
}
private closeRepository(node: RepositoryNode | StatusNode) {

読み込み中…
キャンセル
保存