Encrypts the vault file after edition only if the contents changed

Whenever I edit a vault-protected file, it is re-encrypted even if I discard the changes or don't do any change, so git thinks that the file was actually modified. It forces me to git-checkout it to the previous version.

To avoid this issue I wrote this little patch.