From 66cb344dc70d447d2d1c8bc3865bc5a8e68a8656 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Mon, 29 Oct 2018 19:02:45 +0100 Subject: Correctly detect GIT in a subtree When we use a git subtree, .git is a file, not a directory. The script was already fixed for the commit ID but not for its date. PR: https://github.com/ghc/ghc/pull/212/ --- aclocal.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 55b4162774..18e0d7e5b3 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1536,7 +1536,7 @@ if test "$RELEASE" = "NO"; then if test -f VERSION_DATE; then PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE` AC_MSG_RESULT(given $PACKAGE_VERSION) - elif test -d .git; then + elif test -e .git; then changequote(, )dnl ver_posixtime=`git log -1 --pretty=format:%ct` ver_date=`perl -MPOSIX -e "print strftime('%Y%m%d', gmtime($ver_posixtime));"` -- cgit v1.2.1