Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/engine/DiffusionCommitHookEngine.php
| Show First 20 Lines • Show All 1,206 Lines • ▼ Show 20 Lines | if (strlen($raw_diff) >= $byte_limit) { | ||||
| 'The raw text of this change ("%s") is enormous (larger than %s '. | 'The raw text of this change ("%s") is enormous (larger than %s '. | ||||
| 'bytes).', | 'bytes).', | ||||
| $identifier, | $identifier, | ||||
| new PhutilNumber($byte_limit))); | new PhutilNumber($byte_limit))); | ||||
| } | } | ||||
| 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(); | ||||
| $changes = $parser->parseDiff($raw_diff); | $changes = $parser->parseDiff($raw_diff); | ||||
| $diff = DifferentialDiff::newEphemeralFromRawChanges( | $diff = DifferentialDiff::newEphemeralFromRawChanges( | ||||
| $changes); | $changes); | ||||
| $changesets = $diff->getChangesets(); | $changesets = $diff->getChangesets(); | ||||
| ▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines | |||||