File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/env/node/git/sub-providers Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -576,10 +576,6 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
576576 currentPath = relativePath ;
577577 rev = '' ;
578578 }
579- } else if ( ! skipFirstRev ) {
580- currentSha = '' ;
581- currentPath = relativePath ;
582- rev = '' ;
583579 }
584580 } else if ( ! skipFirstRev ) {
585581 currentSha = rev ;
@@ -635,6 +631,11 @@ export class DiffGitSubProvider implements GitDiffSubProvider {
635631 for ( const commit of parser . parse ( result . stdout ) ) {
636632 const path = relativePath ;
637633 file = commit . files . find ( f => f . path === path || f . originalPath === path ) ;
634+ // If we couldn't find the file, but there is only one file in the commit, use that one and assume the filename changed
635+ if ( file == null && commit . files . length === 1 ) {
636+ file = commit . files [ 0 ] ;
637+ relativePath = file . path ;
638+ }
638639 // Keep track of the file changing paths
639640 if ( file ?. originalPath && file . originalPath !== relativePath ) {
640641 relativePath = file . originalPath ;
You can’t perform that action at this time.
0 commit comments