diff options
author | Jim Meyering <meyering@fb.com> | 2013-10-28 15:25:25 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2013-10-28 15:33:24 -0700 |
commit | 233419c39c6d13d84439b95766328a238ffb6518 (patch) | |
tree | 40d5f404849d5d893dfba444b1f7d571cca59bd1 | |
parent | 8f7425866463f994538584d1dd7211603b8b0550 (diff) | |
download | gnulib-233419c39c6d13d84439b95766328a238ffb6518.tar.gz |
maint.mk: restore functionality removed by recent changev0.1
Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from
the context of a shallow-cloned gnulib repository: "git describe"
would fail in such a directory. However, that change made it so
the reported gnulib revision no longer includes the version number
or a commit count, even when run from a full clone.
* top/maint.mk (gnulib-version): Use the full "git describe"
output when possible, e.g., the form above, rather than the
abbreviated, no-tag, no-commit-count string, and fall back to
using a 10-byte hash, rather than the default minimal-length
hash prefix, since while the minimal-length one may be fine today,
it is likely not to be unique for very long.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | top/maint.mk | 3 |
2 files changed, 17 insertions, 1 deletions
@@ -1,3 +1,18 @@ +2013-10-28 Jim Meyering <meyering@fb.com> + + maint.mk: restore functionality removed by recent change... + Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from + the context of a shallow-cloned gnulib repository: "git describe" + would fail in such a directory. However, that change made it so + the reported gnulib revision no longer includes the version number + or a commit count, even when run from a full clone. + * top/maint.mk (gnulib-version): Use the full "git describe" + output when possible, e.g., the form above, rather than the + abbreviated, no-tag, no-commit-count string, and fall back to + using a 10-byte hash, rather than the default minimal-length + hash prefix, since while the minimal-length one may be fine today, + it is likely not to be unique for very long. + 2013-10-26 Jim Meyering <meyering@fb.com> maint.mk: fix "release" target to build _version diff --git a/top/maint.mk b/top/maint.mk index bf8f53a368..8cb58f8415 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -1283,7 +1283,8 @@ vc-diff-check: rel-files = $(DIST_ARCHIVES) gnulib_dir ?= $(srcdir)/gnulib -gnulib-version = $$(cd $(gnulib_dir) && git rev-parse --short HEAD) +gnulib-version = $$(cd $(gnulib_dir) \ + && { git describe || git rev-parse --short=10 HEAD; } ) bootstrap-tools ?= autoconf,automake,gnulib # If it's not already specified, derive the GPG key ID from |