From 026351a03507dc3a2e89e068c01234dc55914df2 Mon Sep 17 00:00:00 2001 From: John Ellson Date: Fri, 30 Dec 2005 11:23:17 -0500 Subject: [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command I think it is probably a bug that "git non_existent_command" returns its error message to stdout without an error, where "git-non_existent_command" behaves differently and does return an error. Older versions of git did not implement "git describe" and GIT-VERSION-GEN produces an empty version string if run on a system with such a git installed. The consequence is that "make rpm" fails. This patch fixes GIT-VERSION-GEN so that it works in the absence of a working "git describe" Signed-off-by: John Ellson Signed-off-by: Junio C Hamano --- GIT-VERSION-GEN | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 196402ce6..845b9dce6 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -2,7 +2,7 @@ GVF=GIT-VERSION-FILE -VN=$(git describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT +VN=$(git-describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT VN=$(expr "$VN" : v'\(.*\)') if test -r $GVF then -- 2.30.2