[geany/geany] 299f62: Autotools: Fix checking for Git revision

Colomban Wendling git-noreply at xxxxx
Tue Nov 11 18:01:58 UTC 2014


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 11 Nov 2014 18:01:58 UTC
Commit:      299f624f65cc5c5a1ee4be6f38053a2f7ebc2a4b
             https://github.com/geany/geany/commit/299f624f65cc5c5a1ee4be6f38053a2f7ebc2a4b

Log Message:
-----------
Autotools: Fix checking for Git revision

Fix check when building out of tree, and properly handle errors.


Modified Paths:
--------------
    m4/geany-revision.m4

Modified: m4/geany-revision.m4
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -9,8 +9,8 @@ AC_DEFUN([GEANY_CHECK_REVISION],
 	AC_MSG_CHECKING([for Git revision])
 	# try Git first
 	GIT=`which git 2>/dev/null`
-	if test -d ".git" -a "x${GIT}" != "x" -a -x "${GIT}"; then
-		REVISION=`git rev-parse --short --revs-only HEAD || 0`
+	if test -d "$srcdir/.git" -a "x${GIT}" != "x" -a -x "${GIT}"; then
+		REVISION=`cd "$srcdir"; "${GIT}" rev-parse --short --revs-only HEAD 2>/dev/null || echo 0`
 	fi
 
 	if test "x${REVISION}" != "x0"; then



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list