microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.9k stars 29.52k forks source link

Support git's --color-moved and --color-moved-ws options in diff viewer #157164

Open jwarkentin opened 2 years ago

jwarkentin commented 2 years ago

For large code changes or refactoring it is extremely helpful to be able to see which lines of code have actually changed, been added or been removed and easily differentiate them from lines that have simply been rearranged or changed indentation. The git diff command and global git config support options to highlight moved lines differently from changed lines, or event to just grey them out. This includes the ability to ignore lines that moved and only differ in indentation.

I would like to be able to have the same benefit when using the VSCode diff viewer since it's much more convenient than viewing a diff in the terminal. It would also be great if it defaulted to use whatever option is set in the project or global git config based on the values returned by git config --get diff.colormoved and git config --get diff.colormovedws.

lszomoru commented 2 years ago

@alexdima, @hediet, is this something that falls into your area of ownership?

hediet commented 2 years ago

is this something that falls into your area of ownership?

The diffing part yes, reading the setting not.