Escape --upload-pack from expr.
[gitweb.git] / git-clone.sh
index 3d83acbfc8908cf5f17ea50f19fa4cde3ef43e59..4ddfa774ecf70d00b16157d5fc29bfe561702e87 100755 (executable)
@@ -123,7 +123,7 @@ while
                shift
                upload_pack="--upload-pack=$1" ;;
        *,--upload-pack=*)
-               upload_pack=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') ;;
+               upload_pack=--upload-pack=$(expr "z$1" : 'z-[^=]*=\(.*\)') ;;
        1,--depth) usage;;
        *,--depth)
                shift