Originally from the git sources (GIT-VERSION-GEN) (C) Junio C Hamano <junkio@cox.net> Reused under GPL v2.0