AGWA / git-crypt

Transparent file encryption in git
https://www.agwa.name/projects/git-crypt/
GNU General Public License v3.0
8.22k stars 476 forks source link

Consider making `smudge` a public sub-command #48

Open ghost opened 9 years ago

ghost commented 9 years ago

Is it possible to use git-show to see encrypted files?

I tried doing so to obtain the old version of a file, but it outputs the encrypted file.

AGWA commented 9 years ago

Unfortunately, this is isn't possible. git-show operates on blobs, which are at a lower layer than Git attributes, which operate on paths.

However, you can pipe the output of git-show to git-crypt smudge to decrypt it. (git-crypt smudge is meant to be an undocumented internal command, but I can see now how it might be useful to call directly, so perhaps I'll document it and give it a more meaningful name in the next release.)