Page MenuHomePhabricator

D7694.diff

diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -863,43 +863,12 @@
$viewer = $this->getRequest()->getUser();
- $engine = new PhabricatorDifferenceEngine();
- $generated_changesets = array();
foreach ($changesets as $changeset) {
$changeset->attachHunks($changeset->loadHunks());
- $right = $changeset->makeNewFile();
- $choice = $changeset;
- $vs = idx($vs_map, $changeset->getID());
- if ($vs == -1) {
- $left = $right;
- $right = $changeset->makeOldFile();
- } else if ($vs) {
- $choice = $vs_changeset = $vs_changesets[$vs];
- $vs_changeset->attachHunks($vs_changeset->loadHunks());
- $left = $vs_changeset->makeNewFile();
- } else {
- $left = $changeset->makeOldFile();
- }
-
- $synthetic = $engine->generateChangesetFromFileContent(
- $left,
- $right);
-
- if (!$synthetic->getAffectedLineCount()) {
- $filetype = $choice->getFileType();
- if ($filetype == DifferentialChangeType::FILE_TEXT ||
- $filetype == DifferentialChangeType::FILE_SYMLINK) {
- continue;
- }
- }
-
- $choice->attachHunks($synthetic->getHunks());
-
- $generated_changesets[] = $choice;
}
$diff = new DifferentialDiff();
- $diff->attachChangesets($generated_changesets);
+ $diff->attachChangesets($changesets);
$raw_changes = $diff->buildChangesList();
$changes = array();
foreach ($raw_changes as $changedict) {

File Metadata

Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/y4/cv/lvmmm6z3otff7l7p
Default Alt Text
D7694.diff (1 KB)

Event Timeline