diff --git a/src/parser/ArcanistDiffParser.php b/src/parser/ArcanistDiffParser.php
--- a/src/parser/ArcanistDiffParser.php
+++ b/src/parser/ArcanistDiffParser.php
@@ -263,7 +263,9 @@
         // searching for "diff -r" or "diff --git" in the text.
         $this->saveLine();
         $line = $this->nextLineThatLooksLikeDiffStart();
-        if (!$this->tryMatchHeader($patterns, $line, $match)) {
+        if (!phutil_nonempty_string($line)) {
+          $failed_parse = true;
+        } else if (!$this->tryMatchHeader($patterns, $line, $match)) {
           // Restore line before guessing to display correct error.
           $this->restoreLine();
           $failed_parse = true;