summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorJohn Ellson <ellson@research.att.com>2005-12-30 16:23:17 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-06 05:02:01 (GMT)
commit026351a03507dc3a2e89e068c01234dc55914df2 (patch)
tree4e1ac5c4269f2e6e568390cc6128a88c2f924cbe /GIT-VERSION-GEN
parent5df466c507ee2dd81c2e9002c3fedf3536cde0dc (diff)
downloadgit-026351a03507dc3a2e89e068c01234dc55914df2.zip
git-026351a03507dc3a2e89e068c01234dc55914df2.tar.gz
git-026351a03507dc3a2e89e068c01234dc55914df2.tar.bz2
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 <ellson@research.att.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 196402c..845b9dc 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