Minor improvement in the git function