sha1_name: support @{-N} syntax in get_sha1()