File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
77## [ Unreleased]
88### Fixed
99- Fixes [ #454 ] ( https://github.com/eamodio/vscode-gitlens/issues/454 ) - Search for string returns merge commits (unlike raw ` git log -S ` )
10+ - Fixes issue showing changes with untracked stashed files
1011
1112## [ 8.5.2] - 2018-07-20
1213### Fixed
Original file line number Diff line number Diff line change @@ -95,11 +95,18 @@ export class GitLogCommit extends GitCommit {
9595 status = fileNameOrStatus ;
9696 }
9797
98+ let sha ;
99+ // If this is a stash commit with an untracked file
100+ if ( this . type === GitCommitType . Stash && status . status === '?' ) {
101+ sha = `${ this . sha } ^3` ;
102+ }
103+
98104 // If this isn't a single-file commit, we can't trust the previousSha
99105 const previousSha = this . isFile ? this . previousSha : `${ this . sha } ^` ;
100106
101107 return this . with ( {
102108 type : this . isStash ? GitCommitType . StashFile : GitCommitType . File ,
109+ sha : sha ,
103110 fileName : status . fileName ,
104111 originalFileName : status . originalFileName ,
105112 previousSha : previousSha ,
Original file line number Diff line number Diff line change @@ -1770,7 +1770,7 @@ export class GitService extends Disposable {
17701770 }
17711771
17721772 async resolveReference ( repoPath : string , ref : string , uri ?: Uri ) {
1773- if ( ! GitService . isResolveRequired ( ref ) ) return ref ;
1773+ if ( ! GitService . isResolveRequired ( ref ) || ref . endsWith ( '^3' ) ) return ref ;
17741774
17751775 Logger . log ( `resolveReference('${ repoPath } ', '${ ref } ', '${ uri && uri . toString ( ) } ')` ) ;
17761776
You can’t perform that action at this time.
0 commit comments