backport of sha1 expr support

%{sha1:…} added to HEAD. now this useful function backported to v2.x.x
Merge pull request #281 from alanbuxey/v2.x.x

backport of sha1 expr support