git_sha1_gen: catch any error the same way