contrib/rev2hash.sh: use short hash by default and add option to use full hash