Browse Source

Avoids possible infinite loop

main
Eric Amodio 1 year ago
parent
commit
1e632e3e3d
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/git/parsers/diffParser.ts

+ 4
- 1
src/git/parsers/diffParser.ts View File

@ -33,7 +33,10 @@ export function parseGitFileDiff(data: string, includeContents = false): GitDiff
let line;
while (i < lines.length) {
line = lines[i];
if (!line.startsWith('@@')) continue;
if (!line.startsWith('@@')) {
i++;
continue;
}
const header = line.split('@@')[1].trim();
const [previousHeaderPart, currentHeaderPart] = header.split(' ');

Loading…
Cancel
Save