Cache sha1 state from the beginning of commits
Cache sha1 state from the beginning of commits

This results in a ~5x performance improvement for commits without a GPG signature, because the whitespace gets added to the end of the commit object, which usually means that only one block of padding needs to be compressed on each iteration.

It should be possible to make it even faster by:
* Add "static padding" before the dynamic padding to ensuring that the dynamic padding always ends up at a multiple-of-64-byte offset, so that exactly one block needs to be processed on each iteration, regardless of the length of the commit.
* Move padding for GPG-signed commits to the end of the signature rather than the beginning, assuming the signature is still processable. (However, the performance will still depend on the commit message length for GPG-signed commits.)  			  	   					   	  	       	 

not-an-aardvark/lucky-commit,not-an-aardvark/lucky-commit