Improve parsing of the GIT revision number.