It only does so if git is on the PATH and `git rev-parse --short HEAD` produces a UTF-8 string, but the script should never fail.