[commit: ghc] ghc-8.6: Fix Git commit ID detection in Git worktrees (2a162eb)
git at git.haskell.org
git at git.haskell.org
Tue Jul 31 20:34:43 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.6
Link : http://ghc.haskell.org/trac/ghc/changeset/2a162ebac445b629b3ba6621ce81a746b5dd98d7/ghc
>---------------------------------------------------------------
commit 2a162ebac445b629b3ba6621ce81a746b5dd98d7
Author: Sylvain Henry <hsyl20 at gmail.com>
Date: Sat Jul 28 17:48:04 2018 +0200
Fix Git commit ID detection in Git worktrees
Summary: When using a Git worktree, ".git" is a file, not a directory
Reviewers: bgamari, monoidal
Reviewed By: monoidal
Subscribers: rwbarton, thomie, erikd, carter
Differential Revision: https://phabricator.haskell.org/D5016
(cherry picked from commit 3539561b24b78aee2b37280ddf6bb64e2db3a67d)
>---------------------------------------------------------------
2a162ebac445b629b3ba6621ce81a746b5dd98d7
aclocal.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 11c7acd..87b7e85 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1546,7 +1546,7 @@ if test "$RELEASE" = "NO"; then
fi
AC_MSG_CHECKING([for GHC Git commit id])
- if test -d .git; then
+ if test -e .git; then
git_commit_id=`git rev-parse HEAD`
if test -n "$git_commit_id" 2>&1 >/dev/null; then true; else
AC_MSG_ERROR([failed to detect revision: check that git is in your path])
More information about the ghc-commits
mailing list