From 568b941d7e944387e0afb671584783a82474e188 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Fri, 5 Apr 2024 10:33:14 -0600 Subject: [PATCH] configure: .git can be a file as well In worktree scenarios, .git is a file. Assuming its a directory causes the release date to check the ChangeLog instead of the last commit, while not a big issue, can be confusing. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 397e03ad57..1118a578b7 100644 --- a/configure.ac +++ b/configure.ac @@ -2513,7 +2513,7 @@ return 0; # get git revision and last commit date AC_PATH_PROG(HAVE_GIT_CMD, git, "no") if test "$HAVE_GIT_CMD" != "no"; then - if [ test -d .git ]; then + if [ test -e .git ]; then REVISION=`git rev-parse --short HEAD` LAST_COMMIT_DATE=`git log -1 --date=short --pretty=format:%cd` REVISION="$REVISION $LAST_COMMIT_DATE"