From: Junio C Hamano Date: Tue, 18 Oct 2005 04:47:06 +0000 (-0700) Subject: Forward port the "funny ref avoidance" in clone and fetch from maint branch. X-Git-Tag: v0.99.9~94 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cdb3950801fec8e9efa1607093a6e51737bacba0;p=git.git Forward port the "funny ref avoidance" in clone and fetch from maint branch. Somehow I forgot to forward port these fixes. "git clone" from a repository prepared with the latest update-server-info would fail without this patch. Signed-off-by: Junio C Hamano --- diff --git a/git-clone.sh b/git-clone.sh index 71431319..18e692a6 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -53,7 +53,11 @@ Perhaps git-update-server-info needs to be run there?" while read sha1 refname do name=`expr "$refname" : 'refs/\(.*\)'` && - git-http-fetch -v -a -w "$name" "$name" "$1/" || exit 1 + case "$name" in + *^*) ;; + *) + git-http-fetch -v -a -w "$name" "$name" "$1/" || exit 1 + esac done <"$clone_tmp/refs" rm -fr "$clone_tmp" } diff --git a/git-fetch.sh b/git-fetch.sh index 0cb1596f..31b1cf03 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -176,7 +176,7 @@ if test "$tags" then taglist=$(git-ls-remote --tags "$remote" | sed -e ' - /\^{}$/d + /\^/d s/^[^ ]* // s/.*/&:&/') if test "$#" -gt 1