git-clone: stop dumb protocol from copying refs outside heads/ and tags/.
authorJunio C Hamano <junkio@cox.net>
Sat, 25 Nov 2006 03:07:24 +0000 (19:07 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 25 Nov 2006 03:07:24 +0000 (19:07 -0800)
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 <junkio@cox.net>
git-clone.sh

index 9ed413554455a7869c6c2223319eb58b4f3e6463..d4ee93f75bba729c82560f0b2426d8f09f63d82e 100755 (executable)
@@ -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