From 1e8a061e004f280c6590cd46397d6ea2e33fe398 Mon Sep 17 00:00:00 2001 From: Ivan Semenov Date: Mon, 25 Jun 2018 16:28:29 +0300 Subject: [PATCH] [vcs] Fix patch reader so that lines outside context are not parsed --- .../src/com/intellij/openapi/diff/impl/patch/PatchReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/PatchReader.java b/platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/PatchReader.java index 159e3ad44187..ccb555ce346c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/PatchReader.java +++ b/platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/PatchReader.java @@ -432,7 +432,7 @@ public class PatchReader { else if (line.startsWith("-") && expectMeaningfulLines) { type = PatchLine.Type.REMOVE; } - else if (line.startsWith(" ") || line.length() == 0) { + else if (line.startsWith(" ") && expectMeaningfulLines) { type = PatchLine.Type.CONTEXT; } else {