File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
88### Fixed
99- Fixes [ #454 ] ( https://github.com/eamodio/vscode-gitlens/issues/454 ) - Search for string returns merge commits (unlike raw ` git log -S ` )
1010- Fixes issue showing changes with untracked stashed files
11+ - Fixes issue showing changes with working file when the file has been renamed
1112
1213## [ 8.5.2] - 2018-07-20
1314### Fixed
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
8080 const [ workingFileName ] = await Container . git . findWorkingFileName ( gitUri . fsPath , gitUri . repoPath ) ;
8181 if ( workingFileName === undefined ) return undefined ;
8282
83+ args . commit . workingFileName = workingFileName ;
84+
8385 const diffArgs : DiffWithCommandArgs = {
8486 repoPath : args . commit . repoPath ,
8587 lhs : {
@@ -88,7 +90,7 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
8890 } ,
8991 rhs : {
9092 sha : '' ,
91- uri : args . commit . uri
93+ uri : args . commit . workingUri
9294 } ,
9395 line : args . line ,
9496 showOptions : args . showOptions
Original file line number Diff line number Diff line change @@ -153,6 +153,10 @@ export abstract class GitCommit {
153153 return Uri . file ( path . resolve ( this . repoPath , this . fileName ) ) ;
154154 }
155155
156+ get workingUri ( ) : Uri {
157+ return this . workingFileName ? Uri . file ( path . resolve ( this . repoPath , this . workingFileName ) ) : this . uri ;
158+ }
159+
156160 private _dateFormatter ?: Dates . IDateFormatter ;
157161
158162 formatDate ( format ?: string | null ) {
You can’t perform that action at this time.
0 commit comments