[commit: ghc] master: Fix Git commit ID detection in Git worktrees (3539561)

git at git.haskell.org git at git.haskell.org
Sat Jul 28 15:48:22 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3539561b24b78aee2b37280ddf6bb64e2db3a67d/ghc

>---------------------------------------------------------------

commit 3539561b24b78aee2b37280ddf6bb64e2db3a67d
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


>---------------------------------------------------------------

3539561b24b78aee2b37280ddf6bb64e2db3a67d
 aclocal.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aclocal.m4 b/aclocal.m4
index eef4dc7..1412350 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