commit:     67bcfe4cf1874a8571255a9612da75c5c9d1afde
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 19:49:21 2016 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 19:49:21 2016 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=67bcfe4c

Make configure test for git more robust.

* configure.ac: Make testing for git repository more robust.

 ChangeLog    | 2 ++
 configure.ac | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c166ad0..087baae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2016-06-01  Ulrich Müller  <u...@gentoo.org>
 
+       * configure.ac: Make testing for git repository more robust.
+
        * configure.ac: Where possible, use AC_CHECK_PROGS instead of
        AC_PATH_PROGS, in order to avoid absolute paths, bug 122260.
        * libs/core.bash.in (sed):

diff --git a/configure.ac b/configure.ac
index 6fce662..9a72546 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,7 @@ AC_SUBST(EPREFIX)
 AC_MSG_CHECKING([whether building from git])
 EXTRAVERSION=""
 eselect_git_dir=${GIT_DIR:-${srcdir}/.git}
-if test -d "${eselect_git_dir}"; then
+if GIT_DIR="${eselect_git_dir}" git rev-parse >/dev/null 2>&1; then
     COMMIT=`GIT_DIR="${eselect_git_dir}" git describe --long --always HEAD`
     if test x$COMMIT != x; then
         EXTRAVERSION=", git commit $COMMIT"

Reply via email to