diff options
author | Eric Blake <ebb9@byu.net> | 2008-04-08 07:38:18 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-04-08 11:26:12 -0600 |
commit | cfda781673a31835e88e42a8604fb64a0786a9e4 (patch) | |
tree | 2b154fa48993e5ef702a3616477cacb91f97baa8 /build-aux | |
parent | b0db05957a20f6506b0de6b499468baf73ae5121 (diff) | |
download | gnulib-cfda781673a31835e88e42a8604fb64a0786a9e4.tar.gz |
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>
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/git-version-gen | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 7aa025365d..710870cdb9 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -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 @@ if test -n "$v" 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) ;; |