]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-fetch.sh
Add RelNotes 1.5.0.1
[git.git] / git-fetch.sh
index 07a1d05ac7a30b08355f330f5300492ac5afb790..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)
@@ -85,6 +85,12 @@ case "$#" in
        set x $origin ; shift ;;
 esac
 
+if test -z "$exec"
+then
+       # No command line override and we have configuration for the remote.
+       exec="--upload-pack=$(get_uploadpack $1)"
+fi
+
 remote_nick="$1"
 remote=$(get_remote_url "$@")
 refs=
@@ -247,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
@@ -315,7 +308,7 @@ fetch_main () {
              curl_extra_args="-k"
          fi
          if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
-               "`git-repo-config --bool http.noEPSV`" = true ]; then
+               "`git-config --bool http.noEPSV`" = true ]; then
              noepsv_opt="--disable-epsv"
          fi