clean: Improve git diff support

This commit is contained in:
Rodrigo Fernandes 2021-07-09 22:35:27 +01:00
parent 9987e7c695
commit 6ad7f00be2
No known key found for this signature in database
GPG key ID: F44EAFEEB15615CB

View file

@ -276,7 +276,7 @@ export function parse(diffInput: string, config: DiffParserConfig = {}): DiffFil
startFile(); startFile();
// diff --git a/blocked_delta_results.png b/blocked_delta_results.png // diff --git a/blocked_delta_results.png b/blocked_delta_results.png
const gitDiffStart = /^diff --git "?(.+)"? "?(.+)"?/; const gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/;
if ((values = gitDiffStart.exec(line))) { if ((values = gitDiffStart.exec(line))) {
possibleOldName = getFilename(values[1], undefined, config.dstPrefix); possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
possibleNewName = getFilename(values[2], undefined, config.srcPrefix); possibleNewName = getFilename(values[2], undefined, config.srcPrefix);