From: Junio C Hamano Date: Mon, 15 Apr 2013 01:39:44 GMT Subject: Re: [RFC/PATCH 0/2] Test the Git version string Message-ID: <7vli8k4lnj.fsf@alter.siamese.dyndns.org> In-Reply-To: <79879228B71A45A48A961F5B1880B61F@PhilipOakley> "Philip Oakley" writes: >> If the "parsing" is done for white/blacklist purposes, is there a >> need to straight-jacket the verison string format like this series? > > The purpose is to document what we felt we could guarantee, and that > which was open to variation, so that those, like the Git-Gui, can code > in a sensible check for the version. Two digits (X.Y) should pass the > existing Git Gui check. > > I'll drop the length limit, and keep to an X.Y check > > Is the end of t0000-basic.sh a sensible place for the check? Sorry, but I still do not understand what you are trying to achieve. What kind of benefit are you envisioning out of this? For a future version, people would not know what incompatibilities it would introduce, so case "$(git version)" in "git verison"[2-9].*) echo unsupported version exit 1 ;; esac is a nonsense check. For all released versions, people know how they looked like and we do not have anything further to specify. Git 1.5.0 will forever identify itself as: $ git version git version 1.5.0 Worse yet, for an untagged version, you may get something like git version 1.8.2.1-515-g78d2372 and it may or may not behave the same way as 1.8.2.1 depending on what trait you are interested in.