From b5d07a665842fdab5865ce1620f0ddb7cc48d067 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Tue, 20 May 2014 08:52:04 +0200 Subject: Use "git describe" in configure. * configure.ac: Replace "git rev-parse" by "git describe", now that git-r3.eclass supports it (bug 489100). --- ChangeLog | 5 +++++ configure.ac | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 143edc8..d5ddaef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-05-20 Ulrich Müller + + * configure.ac: Replace "git rev-parse" by "git describe", now + that git-r3.eclass supports it (bug 489100). + 2014-03-20 Ulrich Müller * doc/user-guide.txt: Mention the "unset" action also here. diff --git a/configure.ac b/configure.ac index 6379db0..63081e7 100644 --- a/configure.ac +++ b/configure.ac @@ -78,11 +78,11 @@ AC_SUBST(EPREFIX) AC_MSG_CHECKING([whether building from git]) EXTRAVERSION="" if test -d ${GIT_DIR:-.git}; then - GITREV=`git rev-parse --short HEAD` - if test x$GITREV != x; then - EXTRAVERSION="-git-$GITREV" + COMMIT=`git describe --always HEAD` + if test x$COMMIT != x; then + EXTRAVERSION=" (commit $COMMIT)" fi - AC_MSG_RESULT([yes${GITREV:+, at revision $GITREV}]) + AC_MSG_RESULT([yes$EXTRAVERSION]) else AC_MSG_RESULT(no) fi -- cgit v1.2.3-65-gdbad