]> khamidou — GitHub mirrors - arcanist.git/commit
Show text of moved files in Differential
authorepriestley <git@epriestley.com>
Mon, 30 Apr 2012 23:47:12 +0000 (16:47 -0700)
committerepriestley <git@epriestley.com>
Mon, 30 Apr 2012 23:47:12 +0000 (16:47 -0700)
commit7070d0a0657d088c1c7c2b2c6618d9030de627dc
tree46c12ef1cc8364d924b27bc7a927315434a4f7cd
parentb32b868a61078b3a40a745f4a0bb1e895beed946
Show text of moved files in Differential

Summary:
"git diff -M -C" generates useful metadata (moves/copies) but (for a pure move) no diff text. Synthetically build the diff text after the fact so this information is available in Differential.

This patch is kind of nasty but I couldn't see a cleaner way to do it. :/

This also needs some UI changes in Differential: we get a full-green new file right now, but it would be better to default-hide it with "This file was moved. Show More" or similar.

Test Plan: Moved a file, ran "arc diff", got textual diff.

Reviewers: aran, tuomaspelkonen, jungejason, btrahan, vrana

Reviewed By: vrana

CC: aran, epriestley, vrana
Maniphest Tasks: T230

Differential Revision: https://secure.phabricator.com/D479
src/parser/diff/ArcanistDiffParser.php
src/parser/diff/change/ArcanistDiffChange.php
src/repository/api/git/ArcanistGitAPI.php
src/workflow/diff/ArcanistDiffWorkflow.php