mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Partially revert D3748
Summary: D3748 attempted to improve the behavior of `arc diff` when dealing with files merged from another branch, but had the side effect of marking all normal edits and deletes as adds. Revert this side effect, at least. This likely degrades the merging case, but it's comparatively rare, and editing/deleting files is very common. I'll make an effort to fix this properly (and back it with DirectoryFixture tests) when I deal with T1947. Test Plan: Ran `arc diff --preview` for a change that edits or removes files. Reviewers: btrahan, vrana, svemir Reviewed By: svemir CC: aran Differential Revision: https://secure.phabricator.com/D3836
This commit is contained in:
parent
519e23f3a4
commit
d96eaed097
1 changed files with 1 additions and 3 deletions
|
@ -134,10 +134,8 @@ final class ArcanistDiffParser {
|
||||||
$change->setOldPath($cpath);
|
$change->setOldPath($cpath);
|
||||||
$from[$path] = $cpath;
|
$from[$path] = $cpath;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// file was merged from another branch, treat it as a new file
|
|
||||||
$change->setType(ArcanistDiffChangeType::TYPE_ADD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $change->getType();
|
$type = $change->getType();
|
||||||
if (($type === ArcanistDiffChangeType::TYPE_MOVE_AWAY ||
|
if (($type === ArcanistDiffChangeType::TYPE_MOVE_AWAY ||
|
||||||
$type === ArcanistDiffChangeType::TYPE_DELETE) &&
|
$type === ArcanistDiffChangeType::TYPE_DELETE) &&
|
||||||
|
|
Loading…
Reference in a new issue