summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2014-05-20 08:52:04 +0200
committerUlrich Müller <ulm@gentoo.org>2014-05-20 08:52:04 +0200
commitb5d07a665842fdab5865ce1620f0ddb7cc48d067 (patch)
treeebdbbe33120cddecea643d30aef3b3b5e56b4e75
parentRemove redundant heading in user guide. (diff)
downloadeselect-b5d07a665842fdab5865ce1620f0ddb7cc48d067.tar.gz
eselect-b5d07a665842fdab5865ce1620f0ddb7cc48d067.tar.bz2
eselect-b5d07a665842fdab5865ce1620f0ddb7cc48d067.zip
Use "git describe" in configure.
* configure.ac: Replace "git rev-parse" by "git describe", now that git-r3.eclass supports it (bug 489100).
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac8
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 <ulm@gentoo.org>
+
+ * configure.ac: Replace "git rev-parse" by "git describe", now
+ that git-r3.eclass supports it (bug 489100).
+
2014-03-20 Ulrich Müller <ulm@gentoo.org>
* 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