Browse Source

Fixes #359 - Show changes of an added file in the first commit

main
Eric Amodio 6 years ago
parent
commit
97e83ff431
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -0
      src/gitService.ts

+ 1
- 0
CHANGELOG.md View File

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds a tree layout option to tags in the *GitLens* explorer — closes [#358](https://github.com/eamodio/vscode-gitlens/issues/358) - Adds a tree layout option to tags in the *GitLens* explorer — closes [#358](https://github.com/eamodio/vscode-gitlens/issues/358)
### Fixed ### Fixed
- Fixes [#359](https://github.com/eamodio/vscode-gitlens/issues/359) - Show changes of an added file in the first commit
- Fixes issue where comparing previous revision during a merge/rebase conflict failed to show the correct contents - Fixes issue where comparing previous revision during a merge/rebase conflict failed to show the correct contents
- Fixes various issues when not on a branch - Fixes various issues when not on a branch

+ 2
- 0
src/gitService.ts View File

@ -1337,6 +1337,8 @@ export class GitService extends Disposable {
async getVersionedFile(repoPath: string | undefined, fileName: string, sha: string | undefined) { async getVersionedFile(repoPath: string | undefined, fileName: string, sha: string | undefined) {
Logger.log(`getVersionedFile('${repoPath}', '${fileName}', '${sha}')`); Logger.log(`getVersionedFile('${repoPath}', '${fileName}', '${sha}')`);
if (sha === GitService.deletedSha) return undefined;
if (!sha || (Git.isUncommitted(sha) && !Git.isStagedUncommitted(sha))) { if (!sha || (Git.isUncommitted(sha) && !Git.isStagedUncommitted(sha))) {
if (await this.fileExists(repoPath!, fileName)) return fileName; if (await this.fileExists(repoPath!, fileName)) return fileName;

Loading…
Cancel
Save