diff --git a/src/parser/ArcanistDiffParser.php b/src/parser/ArcanistDiffParser.php index ad0e00e5..4ddf5284 100644 --- a/src/parser/ArcanistDiffParser.php +++ b/src/parser/ArcanistDiffParser.php @@ -188,12 +188,12 @@ final class ArcanistDiffParser { } public function parseDiff($diff) { - $this->didStartParse($diff); - - if ($this->getLine() === null) { - $this->didFailParse("Can't parse an empty diff!"); + if (!strlen(trim($diff))) { + throw new Exception("Can't parse an empty diff!"); } + $this->didStartParse($diff); + do { $patterns = array( // This is a normal SVN text change, probably from "svn diff".