X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-fetch-script;h=ea097144f712f9ef1beb0531f1bf945db9485c3f;hb=9d34c29db39bdb5c2443475dd6a24cfc5c2c9e37;hp=2040c125f92c32a4590a895fb321dbd37e7a49d1;hpb=96155e55e175e7fed1d8ebd73557d339f35629d8;p=git.git diff --git a/git-fetch-script b/git-fetch-script index 2040c125..ea097144 100755 --- a/git-fetch-script +++ b/git-fetch-script @@ -15,27 +15,13 @@ http://* | https://*) fi _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' && _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" && - head=$(curl -ns $curl_extra_args "$merge_repo/$merge_head") && + head=$(curl -nsf $curl_extra_args "$merge_repo/$merge_head") && expr "$head" : "$_x40\$" >/dev/null || { echo >&2 "Failed to fetch $merge_head from $merge_repo" exit 1 } - git-fetch-dumb-http "$head" "$@" - case "$?" in - 0) ;; - 2) no_dumb_http_support=1 ;; - *) exit;; - esac echo Fetching "$merge_head" using http - git-http-pull -v -a "$head" "$merge_repo/" || { - case "$no_dumb_http_support" in - 1) - echo >&2 "* This could be because the $merge_repo is packed without" - echo >&2 " preparing dumb server support files." - ;; - esac - exit 1 - } + git-http-pull -v -a "$head" "$merge_repo/" || exit ;; rsync://*) rsync -L "$merge_repo/$merge_head" "$TMP_HEAD" || exit 1 @@ -45,6 +31,10 @@ rsync://*) ;; *) head=$(git-fetch-pack "$merge_repo" "$merge_head") + if h=`expr "$head" : '\([^ ][^ ]*\) '` + then + head=$h + fi ;; esac || exit 1