summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-02-20 23:13:16 +0100
committerJunio C Hamano <gitster@pobox.com>2008-04-09 01:22:50 -0700
commitc48799e560c826905e87c8a8a71effeb0ca5e897 (patch)
tree663eebf6e0a35413fb94a261f0564239d15243c9 /GIT-VERSION-GEN
parentba88a1fee476a7895634beb9f33faf7e7b7908af (diff)
downloadgit-c48799e560c826905e87c8a8a71effeb0ca5e897.tar.gz
Teach GIT-VERSION-GEN about the .git file
The presence of a .git directory used to be good enough evidence that GIT-VERSION-GEN could use 'git describe' to get a version number. But now .git might as well be a file so the test must be extended to cater for such setups. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index f60bab896b..3cabc92e7a 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -11,7 +11,7 @@ LF='
if test -f version
then
VN=$(cat version) || VN="$DEF_VER"
-elif test -d .git &&
+elif test -d .git -o -f .git &&
VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;