File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 88 FileChange ,
99 AppFileStatusKind ,
1010 SubmoduleStatus ,
11+ CommittedFileChange ,
1112} from '../../models/status'
1213import {
1314 DiffType ,
@@ -433,7 +434,8 @@ async function getImageDiff(
433434 // File status can't be conflicted for a file in a commit
434435 if (
435436 file . status . kind !== AppFileStatusKind . New &&
436- file . status . kind !== AppFileStatusKind . Untracked
437+ file . status . kind !== AppFileStatusKind . Untracked &&
438+ file . status . kind !== AppFileStatusKind . Deleted
437439 ) {
438440 // TODO: commitish^ won't work for the first commit
439441 //
@@ -445,6 +447,17 @@ async function getImageDiff(
445447 `${ oldestCommitish } ^`
446448 )
447449 }
450+
451+ if (
452+ file instanceof CommittedFileChange &&
453+ file . status . kind === AppFileStatusKind . Deleted
454+ ) {
455+ previous = await getBlobImage (
456+ repository ,
457+ getOldPathOrDefault ( file ) ,
458+ file . parentCommitish
459+ )
460+ }
448461 }
449462
450463 return {
You can’t perform that action at this time.
0 commit comments