get_sha1: handle special case $commit^{/}