From ddc85c620f4efcbd90fbb064abb0731710042b95 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 17 Aug 2018 19:50:32 +0200 Subject: [PATCH] configure.ac: make the GIT_COMMIT command worktree-safe `$srcdir/.git` doesn't exist if `$srcdir` is a worktree. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 994c75aae..1d33ffb94 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_DEFINE(PROTOCOL_VERSION, "0.20.0", [The MPD protocol version]) -GIT_COMMIT=`GIT_DIR="$srcdir/.git" git describe --dirty --always 2>/dev/null` +GIT_COMMIT=`cd "$srcdir" && git describe --dirty --always 2>/dev/null` if test x$GIT_COMMIT != x; then AC_DEFINE_UNQUOTED(GIT_COMMIT, ["$GIT_COMMIT"], [The current git commit]) fi