]> khamidou — GitHub mirrors - arcanist.git/commit
Fix "empty diff" error in arcanist
authorepriestley <git@epriestley.com>
Wed, 9 Jan 2013 16:15:53 +0000 (08:15 -0800)
committerepriestley <git@epriestley.com>
Wed, 9 Jan 2013 16:15:53 +0000 (08:15 -0800)
commitea1585d7fa19d4720c7fbca4ad70039049ceb142
treef12233ec9cef244d6a070105ccc1507967667207
parenta5ddd7ebc0e62f41d7df05a237309781e0488b9c
Fix "empty diff" error in arcanist

Summary: Ref T2296. This error is unreachable right now -- when I fixed all the "\r\n" stuff, we always end up with a nonempty first line for an empty input. Do this test earlier and more explicitly. This results in a less useful error: "expected (some junk) on line 1" instead of "can't parse an empty diff".

Test Plan: Tried to parse an empty diff, got a "you can't parse an empty diff" error.

Reviewers: btrahan, vrana, codeblock

Reviewed By: codeblock

CC: aran
Maniphest Tasks: T2296

Differential Revision: https://secure.phabricator.com/D4370
src/parser/ArcanistDiffParser.php