OS Version: macOS High Sierra 10.13 Beta (also on the latest version of macOS Sierra 10.12)
Git-crypt git-crypt 0.5.0: https://www.agwa.name/projects/git-crypt/
Steps to Reproduce:
You will see the resulting diff shows the entire encrypted file in red, and the entire unencrypted contents of the file in green, implying the entire file has changed.
When I take a look at the Git tab of the Output console, it looks like the command being used is git show HEAD:/path/to/filename which doesn't seem to play nicely with git-crypt's approach. If I try something like git diff /path/to/filename this works as expected though.
Reproduces without extensions: Yes
I could take a look at this issue if you don't mind.
How about support it on vac extensions?
My theory is that the commands VS Code uses to get git diffs don鈥檛 play nicely with git-crypt, which uses filters defined in a .gitattributes file to transparently decrypt/encrypt certain files in your repository.
You can see more about how git-crypt works here https://github.com/AGWA/git-crypt/blob/master/README.md
Hi again, just wanted to say that in the latest VSCode update, the behaviour has changed. Instead of showing the garbled text for 'before' and the entire file in green for 'after', the diff of a git-crypted file now just shows an error:
The file will not be displayed in the editor because it is either binary, very large or uses an unsupported text encoding.
Whilst this is better than the garbled text, it would still be really cool if VSCode could support git-crypt 鉂わ笍
It would be nice to see the difference of files. Atom for examples allows you to do that! I guess that the git filters in atom are followed...
Is this still not supported ?
Still not supported...
No promises, but I started looking into this for Hacktoberfest
Can confirm that I have a solution; I'll put in a PR today/tomorrow.
Submitted a PR: https://github.com/microsoft/vscode/pull/81983 (cc @joaomoreno)
Awesome! Thanks for taking a look at this @seesemichaelj !
For posterity's sake, there is another open PR which may resolve this issue: https://github.com/microsoft/vscode/pull/81395
@joaomoreno there are a couple of PRs open here to resolve this issue. What are the next steps to selecting one implementation to focus on and get it reviewed and approved?
I'll mark this as a dupe of the more generic https://github.com/microsoft/vscode/issues/24883
Most helpful comment
I could take a look at this issue if you don't mind.