Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
When refactoring code, often several lines will get pulled out of one method and added to a new one or vice versa. In simple diff tools, these changes are frequently annotated as deletes and adds (or confoundingly with the intervening code marked up as added and deleted), but they can be shown as moved-from and moved-to instead. Showing them with this extra info would help reviewers ignore the code (if they trust the existing code), or to find where it got to (if they've found an existing bug and are checking if it got fixed). In the browser, these code motion annotations could be hyperlink anchors within the file to make it easy to jump to and from the old and new locations.
Implementing this in the surrounding tools such as blame would also help track down the code long after any refactoring happened.