changeset 9877:f7b424277771

Use 'git describe --match' if present (added in git 1.5.5). * build-aux/git-version-gen: Limit result to tags that match 'v*' if possible. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Tue, 08 Apr 2008 07:38:18 -0600
parents 057a5220dfd5
children f3f53950d4f1
files ChangeLog build-aux/git-version-gen
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Apr 08 13:11:19 2008 +0200
+++ b/ChangeLog	Tue Apr 08 07:38:18 2008 -0600
@@ -1,3 +1,9 @@
+2008-04-08  Eric Blake  <ebb9@byu.net>
+
+	Use 'git describe --match' if present (added in git 1.5.5).
+	* build-aux/git-version-gen: Limit result to tags that match 'v*'
+	if possible.
+
 2008-04-08  Bruno Haible  <bruno@clisp.org>
 
 	Add tentative support for OpenServer.
--- a/build-aux/git-version-gen	Tue Apr 08 13:11:19 2008 +0200
+++ b/build-aux/git-version-gen	Tue Apr 08 07:38:18 2008 -0600
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2008-04-03.22
+scriptversion=2008-04-08.07
 
 # Copyright (C) 2007-2008 Free Software Foundation
 #
@@ -95,7 +95,8 @@
 then
     : # use $v
 elif test -d .git \
-    && v=`git describe --abbrev=4 HEAD 2>/dev/null` \
+    && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+	  || git describe --abbrev=4 HEAD 2>/dev/null` \
     && case $v in
 	 v[0-9]*) ;;
 	 *) (exit 1) ;;