GIT-VERSION-FILE: check ./version first.
[gitweb.git] / git-fetch.sh
index c1f6e1e84147d7bedd32e4534a5bb9cdb83a52e5..ca984e739a595131dca4070982f524d3a53f9637 100755 (executable)
@@ -37,7 +37,7 @@ do
                ;;
        --upl=*|--uplo=*|--uploa=*|--upload=*|\
        --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)
-               exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)')
+               exec=--upload-pack=$(expr "z$1" : 'z-[^=]*=\(.*\)')
                shift
                ;;
        -f|--f|--fo|--for|--forc|--force)
@@ -253,23 +253,10 @@ if test "$tags"
 then
        taglist=`IFS='  ' &&
                  echo "$ls_remote_result" |
+                 git-show-ref --exclude-existing=refs/tags/ |
                  while read sha1 name
                  do
-                       case "$sha1" in
-                       fail)
-                               exit 1
-                       esac
-                       case "$name" in
-                       *^*) continue ;;
-                       refs/tags/*) ;;
-                       *) continue ;;
-                       esac
-                       if git-check-ref-format "$name"
-                       then
-                           echo ".${name}:${name}"
-                       else
-                           echo >&2 "warning: tag ${name} ignored"
-                       fi
+                       echo ".${name}:${name}"
                  done` || exit
        if test "$#" -gt 1
        then