I have posted a script I\'m using for this to the StackExchange Code Review site.
My original question for this was Is there a way I can sign a
I am not usre I follow, because Linus did make Git with that specific feature in mind (ie the integrity of what you are putting in is exactly what comes out)
See is 2007 speech at Google (transcript):
Most of them I could discard without even trying them out.
- If you're not distributed, you are not worth using, it's that simple.
- If you perform badly, you are not worth using, it is that simple.
- And if you cannot guarantee that the stuff I put into an SCM comes out exactly the same, you are not worth using.
Quite frankly, that pretty much took care of everything out there.
There are a lot of SCM systems that do not guarantee that what you get out of it again is the same thing you put in.
If you have a memory corruption, if you have a disc corruption, you may never know.
The only way you know is you notice that there is corruption in the files when you check them out. And the source control management system does not protect you at all.
And this is not even uncommon. It is very very common. .
So I don't think adding another integrity feature will add any value.
And the "timestamp" isn't exactly a good idea either, since they aren't recorded for a DVCS in the first place (see "Git: checking out old file WITH original create/modified timestamps", and "What's the equivalent of use-commit-times for git?")