# HG changeset patch # User Jim Meyering # Date 1382999125 25200 # Node ID 9b560a24dd4eabcd504d64a7f040eca4b312dd7c # Parent 2cfba752ab3d8960001600f96dbb26bd391ecf42 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. diff -r 2cfba752ab3d -r 9b560a24dd4e ChangeLog --- a/ChangeLog Mon Oct 28 14:44:04 2013 -0600 +++ b/ChangeLog Mon Oct 28 15:25:25 2013 -0700 @@ -1,3 +1,18 @@ +2013-10-28 Jim Meyering + + 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 maint.mk: fix "release" target to build _version diff -r 2cfba752ab3d -r 9b560a24dd4e top/maint.mk --- a/top/maint.mk Mon Oct 28 14:44:04 2013 -0600 +++ b/top/maint.mk Mon Oct 28 15:25:25 2013 -0700 @@ -1283,7 +1283,8 @@ 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