backport of sha1 expr support

%{sha1:…} added to HEAD. now this useful function backported to v2.x.x