瀏覽代碼

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

Loading…
取消
儲存