1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Fix changeset construction special case for empty commits in pre-commit hooks

Summary: Fixes T13155. Ref T13151. A recent change (D19455) changed the return format here, but I missed this special case for empty commits.

Test Plan:
  - T13155 has a good set of reproduction instructions.
  - Pushed an empty commit.
    - Before: bunch of warning log spew.
    - After: clean logs.

Reviewers: amckinley, avivey

Reviewed By: avivey

Maniphest Tasks: T13155, T13151

Differential Revision: https://secure.phabricator.com/D19500
This commit is contained in:
epriestley 2018-06-21 15:53:57 -07:00
parent 9db5ad3476
commit 6136b83275

View file

@ -1212,7 +1212,7 @@ final class DiffusionCommitHookEngine extends Phobject {
if (!strlen($raw_diff)) { if (!strlen($raw_diff)) {
// If the commit is actually empty, just return no changesets. // If the commit is actually empty, just return no changesets.
return array(); return array(array(), 0);
} }
$parser = new ArcanistDiffParser(); $parser = new ArcanistDiffParser();