1
0
mirror of https://github.com/git/git.git synced 2024-09-30 21:51:32 +02:00

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>
This commit is contained in:
Lars Hjemli 2008-02-20 23:13:16 +01:00 committed by Junio C Hamano
parent ba88a1fee4
commit c48799e560

@ -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) ;;