[Feature request] Use "--color-moved" diffing algorithm in PRs #9632
Replies: 11 comments 8 replies
-
Please do this. The one thing I miss most about phabricator is that it can differentiate between moved vs actually changed code. |
Beta Was this translation helpful? Give feedback.
-
Yup, now I'm discouraged to move code blocks into separate files, because the actual change info is lost with the moving of a code block. even though it's nicer in the long run. No one in my team does this in favor of clear PR's, but we do end up with long files for this reason. |
Beta Was this translation helpful? Give feedback.
-
(Crossposted to https://gist.github.com/0xdevalias/1245fe66ac6953d490114b417a0075e3 for posterity) Omg yes, please! This is one of my biggest pet peeves/code review slowdowns when performing large refactors to cleanup a legacy codebase. The following were some manual review notes/commands I added to a recent PR to assist others who were reviewing:
|
Beta Was this translation helpful? Give feedback.
-
Any news about this? |
Beta Was this translation helpful? Give feedback.
-
any news? |
Beta Was this translation helpful? Give feedback.
-
As an alternative, you can use VS Code to review while highlighting moved code. It's available behind an experimental flag. It also works in githubs online version. So, simply press |
Beta Was this translation helpful? Give feedback.
-
Any news about this? |
Beta Was this translation helpful? Give feedback.
-
Also vote for this feature. Current Vscode is able to detect line move inside a file. But not so when functions are moved across files. @hediet |
Beta Was this translation helpful? Give feedback.
-
you know this isn't being prioritized because the squeaky wheel gets the oil and not enough wheels are squeaking for this. and the reason not enough wheels are squeaking for this is because the majority of developers are not that scrutinizing (line-by-line) when it comes to code review, so the introduction of this feature wouldn't change many developers user experience much if at all. |
Beta Was this translation helpful? Give feedback.
-
This would be a huge boon for code review. |
Beta Was this translation helpful? Give feedback.
-
PRs that move code around, even within the same function, show
n
lines removed andn
added. One would assume this diff could be shown as a trivial "code move". This scales poorly when dealing with multiple function trivial code-moves.This also appears to make contributions on Github a bit misleading: moving code around may give the impression that a certain contributor makes huge number of additions and deletions to a repository, when in fact they didn't contribute to any functionality whatsoever.
As of now, git itself IS able to detect such changes: https://git-scm.com/docs/git-diff
Beta Was this translation helpful? Give feedback.
All reactions