From: Vincent Lefevre Date: Mon, 18 Dec 2017 02:01:07 +0000 (+0100) Subject: Fixed git repo detection: for worktrees, .git is a plain file. X-Git-Tag: mutt-1-10-rel~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b142cea13f29367c758c8a8621a64eed80966b9;p=mutt Fixed git repo detection: for worktrees, .git is a plain file. --- diff --git a/version.sh b/version.sh index 45dac50b..e3eda0d2 100644 --- a/version.sh +++ b/version.sh @@ -7,7 +7,7 @@ srcdir=`dirname "$0"` && cd "$srcdir" || exit 1 # Ensure that we have a repo here. # If not, just cat the VERSION file; it contains the latest release number. -{ [ -d ".git" ] && command -v git >/dev/null 2>&1; } \ +{ [ -e ".git" ] && command -v git >/dev/null 2>&1; } \ || exec cat VERSION latesttag="$(git tag --merged=HEAD --list 'mutt-*-rel' | tr - . | sort -Vr | head -n1 | tr . -)"