From e3bf207c8bde1191c3850debd27ac604305bff31 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 22 Jul 2017 11:35:55 +0100 Subject: [PATCH] auto-version.in: Don't insist that `.git' is a directory. Nowadays, `git worktree' can cause this to be a regular file instead, and it's a shame if we can't spot it properly. --- auto-version.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto-version.in b/auto-version.in index c9b1e27..d229a29 100755 --- a/auto-version.in +++ b/auto-version.in @@ -71,7 +71,7 @@ fi ### Main program. ## If this is a Git checkout then Git should be able to identify the version. -if [ -d .git ] && version=$(git describe --abbrev=4 2>/dev/null); then +if [ -e .git ] && version=$(git describe --abbrev=4 2>/dev/null); then ## If the working tree is dirty, indicate with a `+'. case "$(git diff-index --name-only HEAD)" in -- 2.11.0