microsoft / vscode

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

Git diff textconv is broken on unstaged changes #227201

Open Quadrubo opened 2 months ago

Quadrubo commented 2 months ago

Does this issue occur when all extensions are disabled?: Yes

I'm using ansible vault files and the diffs are broken in unstaged changes only.

For ansible vault files, I'm using this .gitattributes config to make sure the diffs are clean when re encrypting a file with the same content twice.

vault.yml diff=ansible-vault merge=binary
diff.ansible-vault.textconv = "ansible-vault view";

However VsCode only seems to support this when staging the changes, not when the changes are unstaged. To me this seems to be a bug.

Screenshot unstaged:

image

Screenshot staged:

image

The file also shows up as modified even though there haven't been any changes when using the diff strategy defined in the .gitattributes file.

Git Diff doesn't have this problem.

vs-code-engineering[bot] commented 2 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.92.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

Quadrubo commented 2 months ago

The latest stable release is 1.92.2. Please try upgrading to the latest version and checking whether this issue remains.

The issue remains on the latest version.