build-sys: git describe listed wrong tag
[debian/dhcpd-pools.git] / build-aux / git-version-gen
index 686f703..0b7655e 100755 (executable)
@@ -103,8 +103,8 @@ then
 # directory, and "git describe" output looks sensible, use that to
 # derive a version string.
 elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
-    && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
-          || git describe --abbrev=4 HEAD 2>/dev/null` \
+    && v=`git describe --tags --abbrev=4 --match='v*' HEAD 2>/dev/null \
+          || git describe --tags --abbrev=4 HEAD 2>/dev/null` \
     && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
     && case $v in
          v[0-9]*) ;;