summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorSylvain Henry <hsyl20@gmail.com>2018-07-28 17:48:04 +0200
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-07-28 17:48:05 +0200
commit3539561b24b78aee2b37280ddf6bb64e2db3a67d (patch)
tree81a41e23a76683c4cf00f5ef0eec99e51e44114f /aclocal.m4
parent754c3a55a603b155fa5d9a282de73d41a4694ffc (diff)
downloadhaskell-3539561b24b78aee2b37280ddf6bb64e2db3a67d.tar.gz
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
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index eef4dc796f..141235057c 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])