microsoft / vscode

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

Commit Diff or Combined Diff does not show file renames or file moves #232947

Open ADTC opened 2 weeks ago

ADTC commented 2 weeks ago

When viewing the diff of a commit from the graph, or when viewing the full diff of changes or staged changes, "moved or renamed" files are not shown as such, but they are shown as separate delete and add operations.

Note: I know that a Git commit has no notion of "renames" but most diff tools (including git diff) use a similarity index to convert any "delete+add" pairs into "rename/move" if they have high similarity. Seems like VS Code diff is completely refusing to do this (even with 100% similarity).

Am I missing a config?

lszomoru commented 2 weeks ago

@hediet, could we add support for renames in the multi-file diff editor?

ADTC commented 2 weeks ago

@lszomoru @hediet a small follow-up on this. Tested on version 1.95.1:

Version: 1.95.1 Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6 Date: 2024-10-31T05:14:54.222Z Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Darwin arm64 23.6.0

lszomoru commented 2 weeks ago

@ADTC, thank you very much for the additional information.