@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.

In 1-up source diffs, retain the "No newline at end of file" on "\" lines

Summary:
See PHI1839. Currently, the "No newline at end of file" text is dropped in the 1-up diff view for changes that affect a file with no trailing newline.

Track it through the construction of diff primitivies more carefully.

Test Plan: {F7695760}

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

+10 -2
+6 -2
src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
··· 83 83 $cells = array(); 84 84 if ($is_old) { 85 85 if ($p['htype']) { 86 - if (empty($p['oline'])) { 86 + if ($p['htype'] === '\\') { 87 + $class = 'comment'; 88 + } else if (empty($p['oline'])) { 87 89 $class = 'left old old-full'; 88 90 } else { 89 91 $class = 'left old'; ··· 129 131 $cells[] = $no_coverage; 130 132 } else { 131 133 if ($p['htype']) { 132 - if (empty($p['oline'])) { 134 + if ($p['htype'] === '\\') { 135 + $class = 'comment'; 136 + } else if (empty($p['oline'])) { 133 137 $class = 'right new new-full'; 134 138 } else { 135 139 $class = 'right new';
+4
src/applications/differential/render/DifferentialChangesetRenderer.php
··· 505 505 $ospec['htype'] = $old[$ii]['type']; 506 506 if (isset($old_render[$ii])) { 507 507 $ospec['render'] = $old_render[$ii]; 508 + } else if ($ospec['htype'] === '\\') { 509 + $ospec['render'] = $old[$ii]['text']; 508 510 } 509 511 } 510 512 ··· 514 516 $nspec['htype'] = $new[$ii]['type']; 515 517 if (isset($new_render[$ii])) { 516 518 $nspec['render'] = $new_render[$ii]; 519 + } else if ($nspec['htype'] === '\\') { 520 + $nspec['render'] = $new[$ii]['text']; 517 521 } 518 522 } 519 523