@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix principal error in makeChangesWithContext()

Summary: `array_fill()`, contrary to `range()`, doesn't accept the last element but the number of elements.

Test Plan: Reparsed commit not changed after the last diff but rebased which was previously reported as changed.

Reviewers: jungejason, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2783

vrana 656c82f9 e84f9f9e

+1 -1
+1 -1
src/applications/differential/storage/DifferentialChangeset.php
··· 142 142 $changes = explode("\n", $hunk->getChanges()); 143 143 foreach ($changes as $l => $line) { 144 144 if ($line[0] == '+' || $line[0] == '-') { 145 - $context += array_fill($l - $num_lines, $l + $num_lines, true); 145 + $context += array_fill($l - $num_lines, 2 * $num_lines + 1, true); 146 146 } 147 147 } 148 148 $with_context[] = array_intersect_key($changes, $context);