Code

git-remote: reject adding remotes with invalid names
[git.git] / GIT-VERSION-GEN
index 1ad324e23696f66451a9ffc05d77f459bf106e83..f60bab896bd9a54714eff3596e38c9ffb9d38ac8 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.5.4.GIT
+DEF_VER=v1.5.5.GIT
 
 LF='
 '
@@ -16,7 +16,8 @@ elif test -d .git &&
        case "$VN" in
        *$LF*) (exit 1) ;;
        v[0-9]*)
-               git diff-index --quiet HEAD || VN="$VN-dirty" ;;
+               test -z "$(git diff-index --name-only HEAD)" ||
+               VN="$VN-dirty" ;;
        esac
 then
        VN=$(echo "$VN" | sed -e 's/-/./g');