I have a regular long SHA-1 hash string. I would like to get the shortest unambiguous SHA-1 hash string version of it. That is, the one I would get by using git log -1
git log -1
$ git rev-parse --short 1a6f39665adf05810f70b37ef6470bbcf61fcd38 1a6f396