From: Junio C Hamano Date: Sat, 25 Nov 2006 03:07:24 +0000 (-0800) Subject: git-clone: stop dumb protocol from copying refs outside heads/ and tags/. X-Git-Tag: v1.5.0-rc0~226 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=983d2ee284936e8bf14823863d3945b4d8740b94;p=git.git git-clone: stop dumb protocol from copying refs outside heads/ and tags/. Most notably, the original code first copied refs/remotes/ that remote side had to local, and overwrote them by mapping refs/heads/ from the remote when a dumb protocol transport was used. This makes the clone behaviour by dumb protocol in line with the git native and rsync transports. Signed-off-by: Junio C Hamano --- diff --git a/git-clone.sh b/git-clone.sh index 9ed413554..d4ee93f75 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -48,6 +48,10 @@ Perhaps git-update-server-info needs to be run there?" case "$name" in *^*) continue;; esac + case "$bare,$name" in + yes,* | ,heads/* | ,tags/*) ;; + *) continue ;; + esac if test -n "$use_separate_remote" && branch_name=`expr "z$name" : 'zheads/\(.*\)'` then