@@ -148,7 +148,7 @@ export class DiffModel {
148148
149149 if ( ! diffContents . trim ( ) ) {
150150 getLogger ( ) . error ( `CodeTransformation: diff.patch file is empty` )
151- throw new Error ( 'No changes were made as a part of this transformation.' )
151+ throw new Error ( CodeWhispererConstants . noChangesMadeMessage )
152152 }
153153
154154 const changedFiles = parsePatch ( diffContents )
@@ -379,25 +379,6 @@ export class ProposedTransformationExplorer {
379379 pathContainingArchive = path . dirname ( pathToArchive )
380380 const zip = new AdmZip ( pathToArchive )
381381 zip . extractAllTo ( pathContainingArchive )
382-
383- // TODO: below only needed if the backend cannot fix the "b/" diff.patch issue
384- const diffPatch = fs . readFileSync (
385- path . join ( pathContainingArchive , ExportResultArchiveStructure . PathToDiffPatch ) ,
386- 'utf-8'
387- )
388- const lines = diffPatch . split ( '\n' )
389- const newLines = lines . map ( ( line ) => {
390- if ( line . trim ( ) . startsWith ( 'diff' ) || line . trim ( ) . startsWith ( '+++' ) ) {
391- return line . replace ( 'b' , 'b/' )
392- }
393- return line
394- } )
395- const newDiffPatch = newLines . join ( '\n' )
396- fs . writeFileSync (
397- path . join ( pathContainingArchive , ExportResultArchiveStructure . PathToDiffPatch ) ,
398- newDiffPatch
399- )
400-
401382 diffModel . parseDiff (
402383 path . join ( pathContainingArchive , ExportResultArchiveStructure . PathToDiffPatch ) ,
403384 transformByQState . getProjectPath ( )
0 commit comments