X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=c92670bf4cff28b6c678b5e1f040237d4d0837f4;hb=3ac3cfb8ebd66ff57ba5e316abddc9612e7b485e;hp=af9d78daea729eb4e753a9e910ce5eafbdee7c52;hpb=92798702cf6d201f80e257a07d0a0c40565c79fe;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index af9d78dae..c92670bf4 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.5.5.GIT +DEF_VER=v1.6.2.4 LF=' ' @@ -11,12 +11,13 @@ 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) ;; v[0-9]*) - test -z "$(git diff-index --name-only HEAD)" || + git update-index -q --refresh + test -z "$(git diff-index --name-only HEAD --)" || VN="$VN-dirty" ;; esac then