<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 29/01/2017 12:18, Emil Lundberg
wrote:<br>
</div>
<blockquote
cite="mid:CAJgCmPxQjvwsexppA5U1ccqt2+hj1jAzmZX-N0gomQEVyywjOA@mail.gmail.com"
type="cite">
<div>If you use gpg-agent, you can instead use `git log -p
<filename>`, which shows you the diff for each commit in
the log. Git will automagically decrypt the files before
diffing.<br>
</div>
<div><br>
</div>
</blockquote>
<p>"Binary files a/xxx.gpg and b/xxx.gpg differ" - some .gitconfig
magic is required to make it happen. After some googling and
tweaking:<br>
</p>
<p>
<meta charset="utf-8">
</p>
<pre class="example" style="color: rgb(88, 110, 117); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(253, 246, 227);">git config --global diff.gpg.textconv "gpg --decrypt --use-agent"
echo "*.gpg filter=gpg diff=gpg" >> ~/.gitattributes</pre>
<br>
But here's a scenario where this doesn't work. You are in a team;
all your files are encrypted to A, B and C. After a while, new team
member D comes along. You 'pass init A B C D' to re-encrypt to
repository. However, D still does not have any access to the
previous versions of each file.<br>
<br>
Re-writing the *entire* git history to re-encrypt every previous
revision is not an easy task.<br>
<br>
Regards,<br>
<br>
Brian.<br>
<p>
<meta charset="utf-8">
</p>
</body>
</html>